Near field communication method, device, electronic device and computer readable storage medium

By calculating and evaluating the link generation value of the link to be selected in near-domain communication and selecting the best link as the relay terminal, the problem of poor communication quality caused by improper selection of relay terminals in the prior art is solved, and more efficient communication quality and user needs are achieved.

CN115474184BActive Publication Date: 2025-04-15CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211119933.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2025-04-15
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

The prior art only considers the signal strength when selecting a relay terminal, which results in the selected relay terminal not necessarily the best choice, which affects the communication quality of the terminal equipment and cannot meet the needs of users.

Method used

By obtaining the link parameters of each link to be selected in the near-domain communication corresponding to the terminal device, the link generation value of each link to be selected, and the target link used to serve the terminal device is selected according to the link generation value. The calculation of link generation value includes weighted sum of distance link generation value, bandwidth link generation value, and service link generation value.

Benefits of technology

By selecting the best link, the communication quality of the terminal equipment is guaranteed, the needs of users are met, and the spectrum efficiency of the communication system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474184B_ABST
    Figure CN115474184B_ABST
Patent Text Reader

Abstract

The present disclosure provides a near-field communication method, device, electronic device and computer-readable storage medium, and relates to the field of communication technology. The method comprises: obtaining link parameters of each link to be selected in the near-field communication corresponding to the terminal device; obtaining link cost values ​​of each link to be selected according to the link parameters of each link to be selected; selecting a target link for serving the terminal device according to the link cost values ​​of each link to be selected, wherein the target link is a link among the links to be selected. The present disclosure obtains the link cost values ​​by obtaining the link parameters of the link to be selected, and selects the target link for serving the terminal device according to the link cost values, thereby selecting the best link, ensuring the communication quality of the terminal device, and thus meeting the needs of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Near-area communication is a new communication mode proposed by 3GPP (3rd Generation Partnership Project) and defined as a new technology that allows LTE (Long Term Evolution) terminals to directly communicate with each other through shared cell network resources without basic network facilities. Based on near-area communication, terminal devices can be connected to other intelligent terminal devices (relay terminals) through wireless technology, and connected to the Internet through the mobile communication network service of the relay terminal, thereby improving the spectrum efficiency of the communication system.

[0003] The quality of the relay terminal selected by the terminal device directly affects the communication quality of the terminal device. At present, the terminal device usually selects the relay terminal with the best signal, and then connects to the Internet through the selected relay terminal. When selecting the relay terminal, the terminal device only considers the signal strength of the relay terminal, which results in the selected relay terminal not being the best relay terminal, which in turn affects the communication quality of the terminal device and cannot meet the needs of users.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides a near-field communication method, device, electronic device and storage medium, which at least to a certain extent overcome the problem that the selected relay terminal is not the best relay terminal, thereby affecting the communication quality of the terminal device and failing to meet the needs of the user.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a near-area communication method is provided, the method comprising: obtaining link parameters of each link to be selected in the near-area communication corresponding to a terminal device, the link parameters comprising one or more of location information of each node on the link, link bandwidth occupancy parameters and continuous duration of relay terminal service; obtaining link cost values ​​of each link to be selected according to the link parameters of each link to be selected; selecting a target link for serving the terminal device according to the link cost values ​​of each link to be selected, wherein the target link is a link among the links to be selected.

[0008] In one embodiment of the present disclosure, the link cost value of each link to be selected is obtained according to the link parameters of each link to be selected, including: obtaining a distance link cost value according to the location information of each node on the link; obtaining a bandwidth link cost value according to the link bandwidth occupancy parameter; obtaining a service link cost value according to the continuous service duration of the relay terminal; and obtaining the link cost value of the link to be selected by weighted summation of the distance link cost value, the bandwidth link cost value and the service link cost value.

[0009] In one embodiment of the present disclosure, the weight of the distance link cost value, the weight of the bandwidth link cost value and the weight of the service link cost value all take values ​​in the interval [0, n], and the sum of the weight of the distance link cost value, the weight of the bandwidth link cost value and the weight of the service link cost value is n, where n is a positive number.

[0010] In one embodiment of the present disclosure, the location information of each node on the link to be selected includes the node location and the link topology relationship; wherein, obtaining the distance link cost value based on the location information of each node on the link includes: calculating the link distance of each sub-link on the link to be selected based on the node position and the link topology relationship of each node on the link to be selected; summing the link distances of each sub-link on the link to be selected to obtain the distance link cost value.

[0011] In one embodiment of the present disclosure, the nodes on the link to be selected include terminal devices, relay terminals and network devices, wherein the location information of the terminal device is obtained in the following manner: receiving first signature information of a service request information sent by the terminal device, the first signature information of the service request information being obtained by signing with a first private key, and the service request information carrying relay identifiers and signal strengths of multiple relay terminals; verifying the first signature information of the service request information with a first public key to obtain the service request information; determining the location information of the terminal device based on the relay identifiers and signal strengths of the multiple relay terminals in the service request information.

[0012] In one embodiment of the present disclosure, the method further includes: receiving location information periodically sent by the terminal device; and reselecting a target link based on the location information periodically sent by the terminal device, so that the terminal device communicates based on the reselected target link.

[0013] In one embodiment of the present disclosure, the method further includes: in the case of roaming switching of the terminal device, the terminal device is authenticated through a public-private key account system in the blockchain.

[0014] In one embodiment of the present disclosure, the link bandwidth occupancy parameter is obtained in the following manner: obtaining the broadband occupancy parameter of the relay terminal on the link to be selected; clustering the broadband occupancy parameters of the relay terminal to obtain the maximum value of the relay terminal broadband occupancy parameter, and using the maximum value of the relay terminal broadband occupancy parameter as the link bandwidth occupancy parameter.

[0015] In one embodiment of the present disclosure, obtaining a service link cost value according to the continuous service duration of the relay terminal includes: calculating a relay terminal score according to the continuous service duration of the relay terminal; calculating a relay terminal cost value according to the relay terminal score; and clustering the relay terminal cost values ​​to obtain the maximum value of the relay terminal cost value as the service link cost value.

[0016] In one embodiment of the present disclosure, the continuous duration of the relay terminal service is obtained by: obtaining the first recorded heartbeat response time and the last recorded heartbeat response time; calculating the time difference between the first recorded heartbeat response time and the last recorded heartbeat response time to obtain the continuous duration of the relay terminal service.

[0017] In one embodiment of the present disclosure, selecting a target link for serving the terminal device based on the link cost values ​​of the links to be selected includes: sorting the links to be selected based on the link cost values; and selecting at least one link to be selected that is ranked first or last as the target link.

[0018] In one embodiment of the present disclosure, after selecting a target link for serving the terminal device based on the link cost values ​​of each link to be selected, the method further includes: allocating traffic generated by terminal device communication to a preset number of target links for communication based on the link cost values.

[0019] According to another aspect of the present disclosure, a near-area communication device is provided, the device comprising: an acquisition module, used to acquire link parameters of each link to be selected in the near-area communication corresponding to a terminal device, the link parameters including one or more of location information of each node on the link, link bandwidth occupancy parameters and continuous duration of relay terminal service; a link cost value generation module, used to obtain link cost values ​​of each link to be selected according to the link parameters of each link to be selected; and a processing module, used to select a target link for serving the terminal device according to the link cost values ​​of each link to be selected, wherein the target link is a link among the links to be selected.

[0020] According to another aspect of the present disclosure, an electronic device is provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-mentioned near area communication method by executing the executable instructions.

[0021] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned near area communication method is implemented.

[0022] According to another aspect of the present disclosure, a computer program product is provided, the computer program product comprising a computer program or computer instructions, the computer program or the computer instructions being loaded and executed by a processor so that a computer implements any of the above-mentioned near area communication methods.

[0023] The embodiments of the present disclosure provide a near-field communication method, device, electronic device, and computer-readable storage medium, wherein a network device obtains link parameters of each link to be selected in the near-field communication corresponding to a terminal device; obtains link cost values ​​of each link to be selected based on the link parameters of each link to be selected; and selects a target link for serving the terminal device based on the link cost values ​​of each link to be selected, wherein the target link is a link among the links to be selected. The present disclosure obtains link cost values ​​by obtaining link parameters of the link to be selected, and selects a target link for serving the terminal device based on the link cost values, thereby selecting the best link, ensuring the communication quality of the terminal device, and thus meeting the needs of the user.

[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0026] Figure 1 A schematic diagram showing a system architecture in an embodiment of the present disclosure;

[0027] Figure 2 A flow chart of a near area communication method in an embodiment of the present disclosure is shown;

[0028] Figure 3 A flow chart of a method for calculating a link cost value of a link to be selected in an embodiment of the present disclosure is shown;

[0029] Figure 4 An example diagram of a link in an embodiment of the present disclosure is shown;

[0030] Figure 5 A schematic diagram of a near area communication device in an embodiment of the present disclosure is shown;

[0031] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0032] Figure 7 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0033] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0034] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0035] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0036] Figure 1 The diagram shows an exemplary system architecture that can be applied to the near area communication method or the near area communication device according to the embodiments of the present disclosure.

[0037] like Figure 1 As shown, the system architecture may include a terminal device 101, a relay terminal 102, a network device 103 and a server 104. The communication data of the terminal device 101 may be forwarded to the network device 103 through one relay terminal 102, or may be forwarded to the network device 103 through multiple relay devices 102. The network device 103 sends the received communication data to the server 104. The terminal device 101, the relay terminal 102, the network device 103 and the server 104 are connected to each other through a network, which may be a wired network or a wireless network.

[0038] Optionally, the wireless network or wired network described above uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0039] The terminal device 101 and the relay terminal 102 may be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, wearable devices, augmented reality devices, virtual reality devices, etc.

[0040] Optionally, the client of the application installed in different terminal devices 101 is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.

[0041] The network device 103 can be any network device having the above functions, for example, a 5G base station.

[0042] The server 104 may be a server that provides various services, such as a background management server that provides support for the device operated by the user using the terminal device 101. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device.

[0043] Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0044] Those skilled in the art can know that the present disclosure is applied in application scenarios such as near-area network communication, distributed network resource sharing and link selection, for example, in near-area network communication, the coverage of base stations in a vast area is insufficient, and the channels of base stations in densely populated areas are insufficient. Figure 1 The number of terminal devices 101, relay terminals 102, network devices 103 and servers 104 is only illustrative, and any number of terminal devices 101, relay terminals 102, network devices 103 and servers 104 may be provided according to actual needs. The embodiments of the present disclosure are not limited to this.

[0045] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.

[0046] First, a near area communication method is provided in an embodiment of the present disclosure, and the method can be executed by any electronic device with computing and processing capabilities.

[0047] Figure 2 A flow chart of a near area communication method in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the near area communication method provided in the embodiment of the present disclosure includes the following S201 to S203.

[0048] S201. Obtain link parameters of each link to be selected in the near area communication corresponding to the terminal device, where the link parameters include one or more of location information of each node on the link, link bandwidth occupancy parameters, and continuous duration of relay terminal service.

[0049] Among them, near-field communication is a communication mode in which the terminal device used by the user can be connected to the relay terminal (the terminal device of other users) through Wireless Fidelity (Wi-Fi) or other wireless technologies, and then connected to the Internet through the mobile communication network service of the relay terminal. The link parameters include at least one of the location information of each node on the link, the link bandwidth occupancy parameter and the continuous service duration of the relay terminal. The link parameters can be used to determine the link that is most suitable for communication among the links to be selected.

[0050] S202: Obtain link cost values ​​of the links to be selected according to the link parameters of the links to be selected.

[0051] Among them, the link cost value is used to evaluate the quality of the link to be selected. The larger the link cost value, the less suitable it is for communication. On the contrary, the smaller the link cost value, the more suitable it is for communication. The specific method of obtaining the link cost value through link parameters is not limited in the embodiments of the present disclosure. For example, the link cost value is obtained by using one or more of a calculation formula, a neural network model, and a relationship correspondence table.

[0052] S203: Select a target link for serving the terminal device according to the link cost value of each link to be selected, wherein the target link is a link among the links to be selected.

[0053] Sort the links to be selected according to the link cost value; select at least one link to be selected that is ranked first or last as the target link. Select the link to be selected with a smaller link cost value as the target link. For example, sort the links to be selected from small to large according to the link cost value; select at least one link to be selected that is ranked first as the target link. For another example, sort the links to be selected from large to small according to the link cost value; select at least one link to be selected that is ranked last as the target link.

[0054] The present disclosure obtains the link cost value by acquiring the link parameters of the link to be selected, and selects the target link for serving the terminal device according to the link cost value, thereby selecting the best link, ensuring the communication quality of the terminal device, and thus meeting the needs of the user.

[0055] Figure 3 A flow chart of a method for calculating the link cost of a link to be selected in an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the link cost calculation method includes the following S301 to S304.

[0056] S301. Obtain a distance link cost according to the location information of each node on the link.

[0057] In one embodiment, the location information of each node on the link to be selected includes the node location and the link topology relationship; wherein, according to the location information of each node on the link, a distance link cost value is obtained, including: according to the node location and the link topology relationship of each node on the link to be selected, the link distance of each sub-link on the link to be selected is calculated; and the link distance of each sub-link on the link to be selected is summed to obtain the distance link cost value.

[0058] Among them, the blockchain is formed by each node on the link, and the node position can be stored on the blockchain. The node position can be the latitude and longitude of the node; the coordinate system is established based on the plane where the node is located. The node position can also be the horizontal and vertical coordinates of the node in the coordinate system. The node position can also be the node ID (Identity, identity identification number), and the node position can also be the location information obtained by system positioning, for example, the Beidou system. The specific representation of the node position is not limited in this embodiment of the disclosure. The link topology relationship includes the order of communication between each node, such as Figure 4 As shown, for example, the link topology relationship of the relay terminal A 42 includes that the previous node connected to the relay terminal A 42 is the terminal device 41, and the next node connected to the relay terminal A 42 is the base station 43.

[0059] For example, Figure 4 As shown, Figure 4 There are two links to be selected, namely link A 47 and link B 48. The communication between the terminal device 41, the relay terminal A 42 and the base station 43 forms link A, and the communication between the terminal device 41, the relay terminal B2 44, the relay terminal B1 45 and the base station 43 forms link B 48. There are two sub-links on link A 47, and the link distances of the two sub-links are the link distance between the terminal device 41 and the relay terminal A 42 and the link distance between the relay terminal A 42 and the base station 43. There are three sub-links on link B 48, and the link distances of the three sub-links are the link distance between the terminal device 41 and the relay terminal B2 44, the link distance between the relay terminal B2 44 and the relay terminal B1 45, and the link distance between the relay terminal B1 45 and the base station 43.

[0060] The server 46 sums the link distances of the two sub-links corresponding to the link A 47 to obtain the distance link cost value of the link A 47; the server 46 sums the link distances of the three sub-links corresponding to the link B 48 to obtain the distance link cost value of the link B 48. The larger the distance link cost value, the longer the communication distance. The longer the communication distance, the more the communication signal attenuates. The more the communication signal attenuates, the lower the maximum bandwidth that can be supported, which is more unfavorable for communication.

[0061] S302: Obtain a bandwidth link cost value according to a link bandwidth occupancy parameter.

[0062] In one embodiment, the link bandwidth occupancy parameter is obtained by: obtaining the bandwidth occupancy parameter of the relay terminal on the link to be selected; clustering the bandwidth occupancy parameters of the relay terminals to obtain the maximum value of the relay terminal bandwidth occupancy parameters, and using the maximum value of the relay terminal bandwidth occupancy parameters as the link bandwidth occupancy parameter.

[0063] Among them, the broadband occupancy parameter is the link bandwidth with the largest broadband occupancy among all links of the relay terminals constituting the link to be selected. The broadband occupancy parameters of the relay terminals are clustered, that is, the broadband occupancy parameters of all relay terminals constituting the link to be selected are sorted to obtain the maximum value of the broadband occupancy parameter of the relay terminal.

[0064] For example, Figure 4 As shown, there are two relay terminals in link B 48, namely relay terminal B2 44 and relay terminal B1 45. In addition to forwarding the communication data of terminal device 41, relay terminal B2 44 and relay terminal B1 45 are also used to forward the communication data of other terminal devices or relay terminals, and form links with other terminal devices or relay terminals. The link bandwidth with the largest bandwidth occupancy among all links of relay terminal B2 44 is calculated, and the link bandwidth with the largest bandwidth occupancy among all links of relay terminal B1 45 is calculated. The bandwidth occupancy parameters of relay terminal B2 44 and the bandwidth occupancy parameters of relay terminal B1 45 are sorted to obtain the maximum value of the relay terminal bandwidth occupancy parameter as the link bandwidth occupancy parameter. The larger the link bandwidth occupancy parameter, the greater the load of the link to be selected and the worse the communication quality.

[0065] S303: Obtain a service link cost value according to the continuous service duration of the relay terminal.

[0066] In one embodiment, the continuous duration of the relay terminal service is obtained by: obtaining the first recorded heartbeat response time and the last recorded heartbeat response time; calculating the time difference between the first recorded heartbeat response time and the last recorded heartbeat response time to obtain the continuous duration of the relay terminal service.

[0067] Exemplarily, the continuous service duration of the relay terminal is obtained in the following manner: when the relay terminal is connected to the near-field communication network, periodically sending heartbeat inquiry information to the relay terminal, wherein the heartbeat inquiry information includes a random number; receiving the second signature information of the heartbeat response information sent by the relay terminal, the second signature information of the heartbeat response information is obtained by signing with a second private key, and the heartbeat response information includes a random number and local time; verifying the second signature information of the heartbeat response information with a second public key to obtain the local time and the random number; when the local time and the random number are correct, recording the heartbeat response time in the blockchain with a private key signature, wherein the heartbeat response time is the time value corresponding to the relay terminal sending a valid heartbeat response message; obtaining the first recorded heartbeat response time and the last recorded heartbeat response time, calculating the time difference between the first recorded heartbeat response time and the last recorded heartbeat response time, and obtaining the continuous service duration of the relay terminal.

[0068] It should be noted that the operator's server periodically sends heartbeat query information to the relay terminal. If the relay terminal does not respond to the heartbeat query information sent by the server, the server will resend the heartbeat query information until there is no response to the heartbeat query information three times. In this case, the relay terminal is considered to no longer provide services. The server will send a transaction indicating that the relay terminal is offline to the blockchain, and the relay terminal service duration will be reset to zero and restarted. Even if the relay terminal is subsequently back online, the relay terminal service duration will be reset to zero and restarted.

[0069] In one embodiment, a service link cost value is obtained according to the continuous service duration of the relay terminal, including: calculating a relay terminal score according to the continuous service duration of the relay terminal; calculating a relay terminal cost value according to the relay terminal score; clustering the relay terminal cost values ​​to obtain the maximum value of the relay terminal cost value as the service link cost value.

[0070] For example, Figure 4 As shown, there are two relay terminals in link B 48, namely relay terminal B2 44 and relay terminal B1 45. The relay terminal service continuity duration of relay terminal B2 44 and the relay terminal service continuity duration of relay terminal B1 45 are obtained through the server, and the relay terminal cost value is calculated according to the relay terminal service continuity duration through the following formula 1.

[0071] S k =1-e -x (Formula 1)

[0072] Among them, S k is the relay terminal cost corresponding to the kth relay terminal in the link to be selected, x is the continuous service duration of the relay terminal, x ≥ 0, e -x Score the relay terminal.

[0073] S304 . Perform weighted summation on the distance link cost, the bandwidth link cost, and the service link cost to obtain the link cost of the link to be selected.

[0074] Among them, the weight of the distance link cost value, the weight of the bandwidth link cost value and the weight of the service link cost value all take values ​​in the interval [0, n], and the sum of the weight of the distance link cost value, the weight of the bandwidth link cost value and the weight of the service link cost value is n, where n is a positive number.

[0075] Exemplarily, when the value of n is 1, the distance link cost value, bandwidth link cost value, and service link cost value are weighted and summed to obtain the link cost value C of the jth link to be selected. j The expression is as follows:

[0076]

[0077] Among them, C j is the link cost of the jth link to be selected, is the bandwidth link cost of the jth link to be selected, is the bandwidth link cost of the jth link to be selected, B k represents the bandwidth occupancy parameter of the kth relay terminal in the jth link to be selected, is the service link cost of the jth link to be selected, S k is the relay terminal cost corresponding to the kth relay terminal in the jth link to be selected; m is the total number of relay terminals in the jth link to be selected, n is the number of sub-links in the jth link to be selected; a, b, c are the weights of the distance link cost, bandwidth link cost and service link cost respectively, and the sum of a, b and c is 1.

[0078] It should be noted that the order of S301, S302, and S303 in the above embodiment can be adjusted according to actual needs, and this application does not make any specific restrictions. When the weight of a link cost value is 0, there is no need to obtain the corresponding link parameter.

[0079] Exemplarily, when the value of a is 0, the values ​​of b and c are not 0, then the expression of the link cost value of the link to be selected is as follows:

[0080]

[0081] Among them, C j is the link cost of the jth link to be selected, is the bandwidth link cost of the jth link to be selected, B k represents the bandwidth occupancy parameter of the kth relay terminal in the jth link to be selected, is the service link cost of the jth link to be selected, S k is the relay terminal cost corresponding to the kth relay terminal in the jth link to be selected; m is the total number of relay terminals in the jth link to be selected; b and c are the weights of the bandwidth link cost and the service link cost respectively, and the sum of b and c is 1.

[0082] When the value of a is 0, and the values ​​of b and c are not 0, the link cost value of the link to be selected is only related to the bandwidth link cost value and the service link cost value.

[0083] In one embodiment, the nodes on the link to be selected include terminal devices, relay terminals and network devices, wherein the location information of the terminal device is obtained in the following manner: receiving first signature information of service request information sent by the terminal device, the first signature information of the service request information is obtained by signing with a first private key, and the service request information carries relay identifications and signal strengths of multiple relay terminals; verifying the first signature information of the service request information with a first public key to obtain the service request information; determining the location information of the terminal device based on the relay identifications and signal strengths of the multiple relay terminals in the service request information.

[0084] Exemplarily, when a terminal device used by a user first accesses a near-area network, it selects three nearby relay terminals and obtains the relay ID (uniquely identifying the relay terminal identity) and the corresponding signal strength of the relay terminal to form a ternary array, the ternary array being ((ID of relay terminal 1, signal strength of relay terminal 1), (ID of relay terminal 2, signal strength of relay terminal 2), (ID of relay terminal 3, signal strength of relay terminal 3)). When the terminal device applies to join the near-area network service, it puts the ternary array into the service request message, signs the message with a first private key to obtain a first signature information, and sends the first signature information to the server.

[0085] After receiving the first signature information, the server verifies the first signature information with the first public key, obtains the service request information, takes out the ternary array, and calculates the coordinates of the terminal device according to the coordinates of relay terminal 1, relay terminal 2, and relay terminal 3 and the signal strength of the terminal device from the three relay terminals, thereby determining the location of the terminal device and obtaining the distance D0 between the terminal device and the surrounding relay terminals. The relay ID can be the SSID (Service Set Identifier, the name of a local area network) of a wireless local area network (Wireless Fidelity, abbreviated as wifi). The present disclosure does not limit what kind of identifier the relay ID is.

[0086] In one embodiment, the method further includes: receiving location information periodically sent by the terminal device; and reselecting a target link based on the location information periodically sent by the terminal device, so that the terminal device communicates based on the reselected target link.

[0087] Exemplarily, after joining the near-area network, the terminal device needs to resend its own positioning ternary array to the server at regular intervals, and the server recalculates the position of the terminal device, thereby recalculating D0, and then reselecting the target link so that the terminal device can communicate according to the reselected target link.

[0088] In one embodiment, after selecting a target link for serving the terminal device according to the link cost values ​​of each link to be selected, the method further includes: allocating traffic generated by terminal device communication to a preset number of target links for communication according to the link cost values.

[0089] When a terminal device selects a link to be selected for communication, it can select one target link or multiple target links. If multiple target links are selected, the traffic generated by the communication is distributed to the multiple target links for communication.

[0090] For example, when a terminal device requests access to a near-field communication network, the service request information may state that it supports multiple target links to serve simultaneously. The server divides the traffic of the terminal device according to a preset ratio based on the load balancing situation. For example, Figure 4 As shown, if the terminal device selects both link A 47 and link B 48 to carry traffic, traffic distribution is performed according to formula 4, which is as follows:

[0091] F1×C1=F2×C2 (Formula 4)

[0092] Among them, C1 is the link cost value of link A 47, C2 is the link cost value of link B 48, F1 is the load percentage of the total flow of the terminal device on link A 47, and F2 is the load percentage of the total flow of the terminal device on link B 48. If C1 is 1 and C2 is 4, F1 is 80% and F2 is 20%.

[0093] In one embodiment, the method further includes: in the case of roaming switching of the terminal device, the terminal device is authenticated through a public-private key account system in the blockchain.

[0094] The terminal device periodically sends location information to the server. The server recalculates the link cost value of the currently used target link and the link cost values ​​of other optional links to be selected based on the location information sent by the terminal device, and calculates the switching threshold R. The expression of R is as follows:

[0095] R=C g / C k (Formula 5)

[0096] Among them, C g is the link cost of the currently selected target link, C k is the link cost of the link to be selected, g is the number of the link to be selected, k is the number of the target link, and both g and k are natural numbers.

[0097] When R is greater than 1, it means that the link cost of the currently selected target link is greater than that of C k The corresponding link cost value of the link to be selected has a preset normal value, which is greater than 1. The normal value can be set in advance as needed, and can also be optimized and adjusted according to the specific situation of the network. If the normal value is too large, the switching will not be timely. If it is too small (close to 1), it will trigger the switching of the link to be selected, causing signal instability.

[0098] For example, the normal value is set to 1.5. When R is greater than 1.5, the terminal device switches the target link, that is, k The corresponding link to be selected is used as the next target link to be selected, and the currently selected target link is switched to the link connected to C k The corresponding link to be selected.

[0099] When the terminal device roams close to other links, the server selects a new link to be selected after calculation, that is, R is greater than 1.5, and will be connected to C k The corresponding link to be selected is used as the next selected target link. The relay information of the relay terminal close to the terminal device in the next selected target link is signed with the private key and sent to the terminal device. The terminal device signs the relay information twice, and puts the relay information, server signature, and terminal device signature together in the connection request and sends it to the relay terminal close to the terminal device in the next selected target link. The relay terminal verifies the relay information and the identity of the terminal device and agrees to establish a connection. Then the relay information is signed for the third time with the private key of the relay terminal, and the relay information, server signature, terminal device signature, and relay terminal signature are sent to the server together. After receiving the relay message signed by the three parties, the server sends a transaction message to the blockchain to record the establishment of this new link to be selected. After the terminal device establishes a connection with the next selected target link, it cuts off the connection with the original selected target link to complete the link switching.

[0100] When roaming and switching in a wireless local area network (WLAN), the terminal device needs to re-authenticate with the AP (Access Point), which usually takes a long time to switch and affects the efficiency of switching. The terminal device disclosed in the present invention is authenticated by the public and private key account system in the blockchain. The terminal device directly authenticates the public and private key account system in the blockchain, and the authentication efficiency is high.

[0101] Based on the same inventive concept, the present disclosure also provides a near-field communication device, as described in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0102] Figure 5 A schematic diagram of a near-field communication device in an embodiment of the present disclosure is shown. Figure 5 As shown, the device includes an acquisition module 51, a link cost value generation module 52 and a processing module 53; the acquisition module 51 is used to obtain the link parameters of each link to be selected in the near-field communication corresponding to the terminal device, and the link parameters include one or more of the location information of each node on the link, the link bandwidth occupancy parameter and the continuous service duration of the relay terminal; the link cost value generation module 52 is used to obtain the link cost value of each link to be selected according to the link parameters of each link to be selected; the processing module 53 is used to select a target link for serving the terminal device according to the link cost value of each link to be selected, wherein the target link is a link among the links to be selected.

[0103] In one embodiment, the link cost value generation module 52 is also used to obtain the distance link cost value based on the location information of each node on the link; obtain the bandwidth link cost value based on the link bandwidth occupancy parameter; obtain the service link cost value based on the continuous service duration of the relay terminal; and perform weighted summation of the distance link cost value, the bandwidth link cost value and the service link cost value to obtain the link cost value of the link to be selected.

[0104] In one embodiment, the weight of the distance link cost value, the weight of the bandwidth link cost value, and the weight of the service link cost value all take values ​​in the interval [0, n], and the sum of the weight of the distance link cost value, the weight of the bandwidth link cost value, and the weight of the service link cost value is n, where n is a positive number.

[0105] In one embodiment, the position information of each node on the link to be selected includes the node position and the link topology relationship; the link cost value generation module 52 is also used to calculate the link distance of each sub-link on the link to be selected according to the node position and the link topology relationship of each node on the link to be selected; the link distances of each sub-link on the link to be selected are summed to obtain the distance link cost value.

[0106] In one embodiment, the nodes on the link to be selected include terminal devices, relay terminals and network devices. The link cost value generation module 52 is also used to receive the first signature information of the service request information sent by the terminal device, the first signature information of the service request information is obtained by signing with a first private key, and the service request information carries the relay identification and signal strength of multiple relay terminals; the first signature information of the service request information is verified with a first public key to obtain the service request information; according to the relay identification and signal strength of the multiple relay terminals in the service request information, the location information of the terminal device is determined.

[0107] In one embodiment, the link cost value generating module 52 is further used to receive location information periodically sent by the terminal device; and reselect the target link according to the location information periodically sent by the terminal device, so that the terminal device communicates according to the reselected target link.

[0108] In one embodiment, the link cost value generation module 52 is also used for authenticating the terminal device through the public and private key account system in the blockchain when the terminal device roams and switches.

[0109] In one embodiment, the link cost value generation module 52 is also used to obtain the bandwidth occupancy parameters of the relay terminals on the link to be selected; cluster the broadband occupancy parameters of the relay terminals to obtain the maximum value of the broadband occupancy parameters of the relay terminals, and use the maximum value of the broadband occupancy parameters of the relay terminals as the link bandwidth occupancy parameters.

[0110] In one embodiment, the link cost value generation module 52 is further used to calculate the relay terminal score according to the continuous service time of the relay terminal; calculate the relay terminal cost value according to the relay terminal score; cluster the relay terminal cost values ​​to obtain the maximum value of the relay terminal cost value as the service link cost value.

[0111] In one embodiment, the link cost value generation module 52 is also used to obtain the first recorded heartbeat response time and the last recorded heartbeat response time when the relay terminal is connected to the near-field communication network; calculate the time difference between the first recorded heartbeat response time and the last recorded heartbeat response time to obtain the continuous service duration of the relay terminal.

[0112] In one embodiment, the processing module 53 is further used to sort the links to be selected according to the link cost value; and select at least one link to be selected that is ranked first or last as the target link.

[0113] In one embodiment, the processing module 53 is further configured to distribute the traffic generated by the terminal device communication to a preset number of target links for communication according to the link cost value.

[0114] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0115] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0116] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, and a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610).

[0117] Among them, the storage unit stores a program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 610 can execute the following steps of the above method embodiment: obtain the link parameters of each link to be selected in the near-field communication corresponding to the terminal device, and the link parameters include one or more of the location information of each node on the link, the link bandwidth occupancy parameter and the continuous service duration of the relay terminal; according to the link parameters of each link to be selected, obtain the link cost value of each link to be selected; according to the link cost value of each link to be selected, select the target link for serving the terminal device, wherein the target link is a link among each link to be selected.

[0118] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0119] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0120] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0121] The electronic device 600 may also communicate with one or more external devices 640 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0122] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0123] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, which may be a readable signal medium or a readable storage medium. Figure 7 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure is shown. Figure 7As shown, a program product capable of implementing the above method of the present disclosure is stored on the computer-readable storage medium 700. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0124] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0126] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0127] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0128] The disclosed embodiment also provides a computer program product, which includes a computer program or computer instructions, which are loaded and executed by a processor to enable a computer to implement the steps described in the above "Specific Implementation" section according to various exemplary implementations of the present disclosure.

[0129] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0130] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0131] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0132] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope of the present disclosure is indicated by the appended claims.

Claims

1. A near area communication method, characterized in that: include: Obtaining link parameters of each link to be selected in the near-field communication corresponding to the terminal device, wherein the link parameters include link bandwidth occupancy parameters and relay terminal service continuous duration; Obtaining link cost values ​​of the links to be selected according to the link parameters of the links to be selected; Selecting a target link for serving the terminal device according to the link cost values ​​of the links to be selected, wherein the target link is a link among the links to be selected; The expression of the link cost value of the link to be selected is as follows: Among them, C j is the link cost of the jth link to be selected, is the bandwidth link cost of the jth link to be selected, B k represents the bandwidth occupancy parameter of the kth relay terminal in the jth link to be selected, is the service link cost of the jth link to be selected, S k is the relay terminal cost value corresponding to the kth relay terminal in the jth link to be selected; m is the total number of relay terminals in the jth link to be selected; b and c are the weights of the bandwidth link cost value and the service link cost value respectively, and the sum of b and c is 1; Among them, when the relay terminal is connected to the near-field communication network, heartbeat inquiry information is periodically sent to the relay terminal, wherein the heartbeat inquiry information includes a random number; the second signature information of the heartbeat response information sent by the relay terminal is received, the second signature information of the heartbeat response information is obtained by signing with a second private key, and the heartbeat response information includes a random number and local time; the second signature information of the heartbeat response information is verified with a second public key to obtain the local time and the random number; when the local time and the random number are correct, the heartbeat response time is recorded in the blockchain with a private key signature, wherein the heartbeat response time is the time value corresponding to the relay terminal sending a valid heartbeat response message; the first recorded heartbeat response time and the last recorded heartbeat response time are obtained, and the time difference between the first recorded heartbeat response time and the last recorded heartbeat response time is calculated to obtain the continuous service duration of the relay terminal.

2. The near area communication method according to claim 1, characterized in that: The link parameters of the link to be selected also include the location information of each node on the link; The step of obtaining the link cost value of each link to be selected according to the link parameters of each link to be selected includes: According to the location information of each node on the link, a distance link cost value is obtained; According to the link bandwidth occupancy parameter, a bandwidth link cost value is obtained; Obtaining a service link cost value according to the continuous service duration of the relay terminal; The distance link cost value, the bandwidth link cost value and the service link cost value are weighted and summed to obtain the link cost value of the link to be selected.

3. The near area communication method according to claim 2, characterized in that: The weight of the distance link cost value, the weight of the bandwidth link cost value and the weight of the service link cost value all take values ​​in the interval [0, n], and the sum of the weight of the distance link cost value, the weight of the bandwidth link cost value and the weight of the service link cost value is n, where n is a positive number.

4. The near area communication method according to claim 2, characterized in that: The location information of each node on the link to be selected includes the node location and the link topology relationship; The step of obtaining the distance link cost value according to the location information of each node on the link includes: Calculate the link distance of each sub-link on the link to be selected according to the node position and link topology relationship of each node on the link to be selected; The link distances of the sub-links on the link to be selected are summed to obtain the distance link cost value.

5. The near area communication method according to claim 4, characterized in that: The nodes on the link to be selected include terminal devices, relay terminals and network devices, wherein the location information of the terminal devices is obtained in the following manner: receiving first signature information of the service request information sent by the terminal device, where the first signature information of the service request information is signed with a first private key, and the service request information carries relay identifiers and signal strengths of multiple relay terminals; Verify the first signature information of the service request information with the first public key to obtain the service request information; The location information of the terminal device is determined according to the relay identifiers and signal strengths of the multiple relay terminals in the service request information.

6. The near area communication method according to claim 5, characterized in that: The method further comprises: Receiving location information periodically sent by the terminal device; According to the location information periodically sent by the terminal device, the target link is reselected so that the terminal device communicates according to the reselected target link.

7. The near area communication method according to claim 6, characterized in that: The method further comprises: In the case of roaming switching of the terminal device, the terminal device is authenticated through the public and private key account system in the blockchain.

8. The near area communication method according to claim 2, characterized in that: The link bandwidth occupancy parameter is obtained by: Obtaining a bandwidth occupancy parameter of a relay terminal on the link to be selected; The broadband occupancy parameters of the relay terminals are clustered to obtain a maximum value of the broadband occupancy parameters of the relay terminals, and the maximum value of the broadband occupancy parameters of the relay terminals is used as a link broadband occupancy parameter.

9. The near area communication method according to claim 2, characterized in that: The obtaining of the service link cost value according to the continuous service duration of the relay terminal includes: Calculating a relay terminal score according to the continuous service duration of the relay terminal; Calculating a relay terminal cost according to the relay terminal score; The relay terminal cost values ​​are clustered to obtain the maximum value of the relay terminal cost value as the service link cost value.

10. The near area communication method according to any one of claims 2 to 9, characterized in that: The relay terminal service continuous duration is obtained by: Get the first recorded heartbeat response time and the last recorded heartbeat response time; The time difference between the first recorded heartbeat response time and the last recorded heartbeat response time is calculated to obtain the continuous service duration of the relay terminal.

11. The near area communication method according to claim 10, characterized in that: The selecting, according to the link cost values ​​of the links to be selected, a target link for serving the terminal device includes: Sorting the links to be selected according to the link cost values; At least one of the links to be selected that is ranked first or last is selected as the target link.

12. The near area communication method according to claim 10, characterized in that: After selecting a target link for serving the terminal device according to the link cost values ​​of the links to be selected, the method further includes: According to the link cost value, the traffic generated by the terminal device communication is distributed to a preset number of target links for communication.

13. A near area communication device, characterized in that: include: An acquisition module, used to acquire link parameters of each link to be selected in the near field communication corresponding to the terminal device, wherein the link parameters include link bandwidth occupancy parameters and relay terminal service continuous duration; A link cost value generating module, used for obtaining the link cost value of each link to be selected according to the link parameters of each link to be selected; A processing module, configured to select a target link for serving the terminal device according to the link cost values ​​of the links to be selected, wherein the target link is a link among the links to be selected; The expression of the link cost value of the link to be selected is as follows: Among them, C j is the link cost of the jth link to be selected, is the bandwidth link cost of the jth link to be selected, B k represents the bandwidth occupancy parameter of the kth relay terminal in the jth link to be selected, is the service link cost of the jth link to be selected, S k is the relay terminal cost value corresponding to the kth relay terminal in the jth link to be selected; m is the total number of relay terminals in the jth link to be selected; b and c are the weights of the bandwidth link cost value and the service link cost value respectively, and the sum of b and c is 1; Among them, the acquisition module is also used to periodically send heartbeat inquiry information to the relay terminal when the relay terminal is connected to the near-field communication network, wherein the heartbeat inquiry information includes a random number; receive the second signature information of the heartbeat response information sent by the relay terminal, the second signature information of the heartbeat response information is obtained by signing with a second private key, and the heartbeat response information includes a random number and a local time; verify the second signature information of the heartbeat response information with a second public key to obtain the local time and the random number; when the local time and the random number are correct, record the heartbeat response time in the blockchain with a private key signature, wherein the heartbeat response time is the time value corresponding to the relay terminal sending a valid heartbeat response message; obtain the first recorded heartbeat response time and the last recorded heartbeat response time, calculate the time difference between the first recorded heartbeat response time and the last recorded heartbeat response time, and obtain the continuous service duration of the relay terminal.

14. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the near area communication method according to any one of claims 1 to 12 by executing the executable instructions.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the near area communication method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Near-field communication method and device, equipment and medium

    CN114928830A