Location-based service data processing method and apparatus
By using blockchain and smart contract technologies, the real address of an IoT terminal is replaced with a temporary address, which solves the security problem of IoT terminal addresses and achieves the protection of privacy data and the normal response of location services.
Patent Information
- Application Number
- CN202110276087.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-15
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2041-03-15
AI Technical Summary
The security of the real address of IoT terminals cannot be effectively guaranteed in existing technologies, especially in location-based services where there is a risk of privacy data leakage.
By using blockchain technology and smart contracts, the real address of an IoT terminal is replaced with a temporary address, and the corresponding relationship is recorded in the blockchain. This enables communication between the IoT terminal and the location service provider, ensuring that the real address is not obtained by the location service provider.
It effectively protects the real address of IoT terminals from being obtained by location service providers, ensuring the privacy and security of IoT terminal data, while still enabling location-based service responses.
Smart Images

Figure CN115080872B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a location-based service data processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] In the digital economy era, the importance of data security and privacy protection is becoming increasingly prominent. In particular, the protection of user privacy data, represented by location-based services (LBS), is becoming a focus of industry attention.
[0003] In related technologies, operating systems such as iOS and Android provide location-based services for IoT terminals. However, because these operating systems are often proprietary and operated by certain companies, the security of the IoT terminals' actual addresses cannot be guaranteed.
[0004] Therefore, how to improve the security of the real address of IoT terminals is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a location-based service data processing method, apparatus, electronic device, and computer-readable storage medium, which improves the security of the real address of IoT terminals.
[0006] To achieve the above objectives, this application provides a location-based service data processing method applied to blockchain, comprising:
[0007] Receive a location service request sent by an IoT terminal; wherein the location service request includes the IoT terminal's real address, location information, location service request type, and location service provider;
[0008] The real address of the IoT terminal in the location service request is replaced with a temporary address using a smart contract, and the replaced location service request is sent to the location service provider.
[0009] Receive a location service response sent by the location service provider; wherein the location service response includes the temporary address and response information generated by the location service provider based on the location information and the location service request type;
[0010] The smart contract is used to replace the temporary address in the location service response with the real address, and the replaced location service response is sent to the IoT terminal.
[0011] The method comprises the following steps:
[0012] The real address of the Internet of Things terminal in the location service request is replaced with a temporary address by using the smart contract.
[0013] The correspondence between the real address and the temporary address is recorded in the smart contract.
[0014] Correspondingly, the temporary address in the location service response is replaced with the real address by using the smart contract, which comprises the following steps:
[0015] The temporary address in the location service response is replaced with the real address based on the correspondence recorded in the smart contract.
[0016] The method comprises the following steps:
[0017] A temporary address in an on-chain address pool is selected by using the smart contract.
[0018] The real address of the Internet of Things terminal in the location service request is replaced with the temporary address.
[0019] The state of the temporary address is updated to be in use.
[0020] Correspondingly, after the temporary address in the location service response is replaced with the real address based on the correspondence recorded in the smart contract, the method further comprises the following steps:
[0021] The state of the temporary address is updated to be unused.
[0022] After the real address of the Internet of Things terminal in the location service request is replaced with the temporary address, the method further comprises the following steps:
[0023] The temporary address is deleted from the on-chain address pool.
[0024] Correspondingly, after the temporary address in the location service response is replaced with the real address based on the correspondence recorded in the smart contract, the method further comprises the following steps:
[0025] The temporary address is re-added to the on-chain address pool.
[0026] The blockchain comprises a service node corresponding to the location service provider.
[0027] The sending of the replaced location service request to the location service provider comprises:
[0028] The sending of the replaced location service request to the location service provider comprises:
[0029] The receiving of the location service response sent by the location service provider comprises:
[0030] The receiving of the location service response sent by the location service provider comprises:
[0031] The blockchain further comprises a supervision node corresponding to a supervision department.
[0032] After the receiving of the location service request sent by the Internet of Things terminal, the method further comprises:
[0033] The sending of the location service request to the supervision node;
[0034] After the receiving of the location service response sent by the location service provider, the method further comprises:
[0035] The sending of the location service response to the supervision node.
[0036] The location service provider comprises an operating system.
[0037] To achieve the above object, the application provides a location-based service data processing device applied to a blockchain, comprising:
[0038] A first receiving module is configured to receive a location service request sent by an Internet of Things terminal; wherein the location service request comprises a real address, location information, a location service request type and a location service provider of the Internet of Things terminal.
[0039] A first replacing module is configured to replace the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and send the replaced location service request to the location service provider.
[0040] A second receiving module is configured to receive a location service response sent by the location service provider; wherein the location service response comprises the temporary address and response information generated by the location service provider based on the location information and the location service request type.
[0041] A second replacing module is configured to replace the temporary address in the location service response with the real address by using the smart contract, and send the replaced location service response to the Internet of Things terminal.
[0042] To achieve the above object, the application provides an electronic device, comprising:
[0043] a memory for storing a computer program;
[0044] a processor for executing the computer program to realize the steps of the above-mentioned location-based service data processing method.
[0045] To achieve the above object, the application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the above-mentioned location-based service data processing method.
[0046] According to the above scheme, the application provides a location-based service data processing method, which comprises the following steps: receiving a location service request sent by an Internet of Things terminal; wherein the location service request comprises a real address, location information, a location service request type and a location service provider of the Internet of Things terminal; replacing the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and sending the replaced location service request to the location service provider; receiving a location service response sent by the location service provider; wherein the location service response comprises the temporary address and response information generated by the location service provider based on the location information and the location service request type; replacing the temporary address in the location service response with the real address by using the smart contract, and sending the replaced location service response to the Internet of Things terminal.
[0047] The location-based service data processing method provided by the application realizes the communication between the Internet of Things terminal and the location service provider by using a block chain. Specifically, the Internet of Things terminal sends a location service request to the block chain, the block chain replaces the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and sends the replaced location service request to the location service provider. The location service provider generates response information based on the location information and the location service request type in the location service request, and returns a location service response to the block chain. The block chain replaces the temporary address of the Internet of Things terminal in the location service response with the real address by using the smart contract, and returns the replaced location service response to the Internet of Things terminal. As can be seen, the location-based service data processing method provided by the application realizes the replacement of the real address of the Internet of Things terminal by using the smart contract in the block chain, thereby playing a role in isolating the location service provider from obtaining the real address of the Internet of Things terminal. On the premise that the real address of the Internet of Things terminal is protected from being obtained by the location service provider, the location-based service can still be completed, and the return of the location service response is realized. The application also discloses a location-based service data processing device, an electronic device and a computer readable storage medium, which can also realize the above technical effects.
[0048] It should be understood that the above general description and the following detailed description are only exemplary, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor. The drawings are used to provide further understanding of the present disclosure and constitute a part of the specification, and together with the following detailed description, serve to explain the present disclosure, but do not constitute a limitation on the present disclosure. In the drawings:
[0050] Figure 1 A flow chart of a location-based service data processing method according to an exemplary embodiment is shown;
[0051] Figure 2 A flow chart of another location-based service data processing method according to an exemplary embodiment is shown;
[0052] Figure 3 A structure diagram of an application embodiment provided by the present application is shown;
[0053] Figure 4 A structure diagram of a location-based service data processing device according to an exemplary embodiment is shown;
[0054] Figure 5 A structure diagram of an electronic device according to an exemplary embodiment is shown. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, not necessarily to describe a specific order or sequence.
[0056] The embodiments of the present application disclose a location-based service data processing method, which improves the security of the real address of the Internet of Things terminal.
[0057] Referring to Figure 1, a flowchart of a location-based service data processing method according to an exemplary embodiment, as shown in Figure 1 , including:
[0058] S101: receiving a location service request sent by an Internet of Things terminal; wherein the location service request includes a real address, location information, a location service request type and a location service provider of the Internet of Things terminal;
[0059] The execution subject of the present embodiment is a blockchain, which is located between the Internet of Things terminal and the location service provider, and realizes the communication between the Internet of Things terminal and the location service provider. The Internet of Things terminal in the present embodiment can include a mobile phone, a car, etc., and the location service provider can include an operating system such as IOS, Android, etc., which is not specifically limited herein. The blockchain in the present embodiment includes a service node corresponding to the location service provider, and the blockchain communicates with the corresponding location service provider through the service node. The service node adopts a minimum storage mode and only stores the location service information related to the corresponding location service provider. The blockchain further includes a supervision node corresponding to a supervision department, and the supervision node adopts a full-amount storage mode and stores all location service information, thereby realizing effective supervision of the location service provided by the location service provider and ensuring the compliance of the location-based service.
[0060] In a specific implementation, the Internet of Things terminal sends a location service request to the blockchain, which includes the real address, location information, location service request type and location service provider of the Internet of Things device, and of course can also include other contents, which are not specifically limited in the present embodiment. The real address of the Internet of Things device, for example, the real IP (Chinese full name: Internet Protocol, English full name: Internet Protocol) address and the real Mac (Chinese full name: Media Access Control, English full name: Media Access Control) address of the Internet of Things device, the location service request type, for example, the weather information corresponding to the location information, i.e. the location service request is used to request the weather information corresponding to the location information of the Internet of Things terminal.
[0061] It can be understood that after the present step, the location service request can also be sent to the supervision node for storage, i.e. the location service information stored by the supervision node includes the location service request sent by the terminal device.
[0062] S102: replacing the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and sending the replaced location service request to the location service provider;
[0063] In this step, the blockchain chains the location service request sent by the Internet of Things terminal, and automatically replaces the real address in the location service request with a temporary address by using the smart contract. Further, the blockchain uses an off-chain monitoring mechanism to send the location service request after replacement to the location service provider in the location service request through a corresponding service node, which includes the temporary address of the Internet of Things device, location information, location service request type, and location service provider, and of course can also include other content, which is not limited in the embodiment.
[0064] S103: receiving the location service response sent by the location service provider; wherein the location service response includes the temporary address and response information generated by the location service provider based on the location information and the location service request type;
[0065] In a specific implementation, the location service provider receives the location service request sent by the blockchain through a corresponding service node, generates response information based on the location information and the location service type, for example, the weather information corresponding to the location information is minus 12 degrees Celsius. The location service provider returns the location service response to the blockchain through a corresponding service node, that is, the blockchain receives the location service response sent by the location service provider through a corresponding service node, which includes the temporary address of the Internet of Things device and the above-mentioned response information.
[0066] It can be understood that after this step, the location service response can also be sent to the supervision node for storage, that is, the location service information stored by the supervision node includes the location service response returned by the location service provider.
[0067] S104: replacing the temporary address in the location service response with the real address by using the smart contract, and sending the location service response after replacement to the Internet of Things terminal.
[0068] In this step, the blockchain chains the location service response returned by the location service provider, and automatically replaces the temporary address in the location service response with the real address by using the smart contract. Further, the blockchain returns the location service response after replacement to the Internet of Things terminal corresponding to the real address through an off-chain monitoring mechanism, which includes the real address of the Internet of Things device and the above-mentioned response information. After receiving the location service response after replacement, the Internet of Things terminal displays information and provides services to the user.
[0069] The location-based service data processing method provided in the embodiments of the present application realizes the communication between the Internet of Things terminal and the location service provider by using the blockchain. Specifically, the Internet of Things terminal sends a location service request to the blockchain, the blockchain replaces the real address of the Internet of Things terminal in the location service request with a temporary address by using the smart contract, and sends the location service request after the replacement to the location service provider. The location service provider returns a location service response to the blockchain based on the location information and the response information generated based on the type of the location service request in the location service request. The blockchain replaces the temporary address of the Internet of Things terminal in the location service response with the real address by using the smart contract, and returns the location service response after the replacement to the Internet of Things terminal. As can be seen, the location-based service data processing method provided in the embodiments of the present application realizes the replacement of the real address of the Internet of Things terminal by using the smart contract in the blockchain, thereby playing a role of isolating the location service provider from obtaining the real address of the Internet of Things terminal. On the premise that the real address of the Internet of Things terminal is protected from being obtained by the location service provider, the location-based service can still be completed, and the return of the location service response is realized.
[0070] The embodiments of the present application disclose a location-based service data processing method. Compared with the previous embodiment, the technical solution is further described and optimized in the present embodiment. Specifically,
[0071] Referring to Figure 2 , a flowchart of another location-based service data processing method according to an exemplary embodiment is shown in Figure 2 , which includes
[0072] S201: receiving a location service request sent by an Internet of Things terminal; wherein the location service request includes a real address of the Internet of Things terminal, location information, a location service request type and a location service provider;
[0073] S202: replacing the real address of the Internet of Things terminal in the location service request with a temporary address in the on-chain address pool by using the smart contract;
[0074] S203: recording the correspondence between the real address and the temporary address in the smart contract;
[0075] The present embodiment maintains the temporary address by using the on-chain address pool. When the blockchain receives the location service request sent by the Internet of Things terminal, a temporary address is randomly selected from the on-chain address pool to replace the real address in the location service request, and the correspondence between the real address and the temporary address is recorded in the smart contract.
[0076] S204: sending the location service request after the replacement to the location service provider;
[0077] S205: receiving a location service response sent by the location service provider; wherein the location service response comprises the temporary address and response information generated by the location service provider based on the location information and the location service request type;
[0078] S206: replacing the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract;
[0079] In a specific implementation, when the block chain receives the location service response returned by the location service provider, the temporary address in the location service response is replaced with the corresponding real address based on the correspondence recorded in the smart contract.
[0080] S207: sending the replaced location service response to the Internet of Things terminal.
[0081] On the basis of the embodiment, as a feasible implementation, the method of replacing the real address of the Internet of Things terminal in the location service request with the temporary address in the on-chain address pool by using the smart contract comprises: selecting a temporary address in the on-chain address pool by using the smart contract, wherein the state of the temporary address is unused; replacing the real address of the Internet of Things terminal in the location service request with the temporary address; updating the state of the temporary address to be in use; correspondingly, after replacing the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract, the method further comprises: updating the state of the temporary address to be unused.
[0082] In the embodiment, the on-chain address pool comprises all temporary addresses, and each temporary address corresponds to a state, including in use and unused. When the block chain receives the location service request sent by the Internet of Things terminal, a temporary address with an unused state is randomly selected from the on-chain address pool, the real address of the Internet of Things terminal in the location service request is replaced with the temporary address, and then the state of the temporary address in the smart contract is updated from unused to in use. When the block chain receives the location service response returned by the location service provider, the temporary address in the location service response is replaced with the corresponding real address based on the correspondence recorded in the smart contract, and then the state of the temporary address is updated from in use to unused.
[0083] On the basis of the embodiment, as a feasible implementation, after replacing the real address of the Internet of Things terminal in the location service request with the temporary address, the method further comprises: deleting the temporary address from the on-chain address pool; correspondingly, after replacing the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract, the method further comprises: re-adding the temporary address to the on-chain address pool.
[0084] In the embodiment, the on-chain address pool only includes unused temporary addresses. When the block link receives a location service request sent by the Internet of Things terminal, a temporary address is randomly selected from the on-chain address pool, the real address of the Internet of Things terminal in the location service request is replaced with the temporary address, and then the temporary address is deleted from the on-chain address pool. When the block link receives a location service response returned by the location service provider, the temporary address in the location service response is replaced with the corresponding real address based on the corresponding relationship recorded in the smart contract, and then the temporary address is re-added to the on-chain address pool.
[0085] As can be seen, the embodiment maintains temporary addresses through the on-chain address pool, and when the block link receives a location service request sent by the Internet of Things terminal, a temporary address is randomly selected from the on-chain address pool, which is used to replace the real address in the location service request. The embodiment realizes the replacement of the real address of the Internet of Things terminal through the smart contract in the block chain, thereby playing a role in isolating the real address of the Internet of Things terminal from being obtained by the location service provider. On the premise of protecting the real address of the Internet of Things terminal from being obtained by the location service provider, the location-based service can still be completed, and the return of the location service response is realized.
[0086] An application embodiment provided by the present application will be introduced below, referring to Figure 3 , Figure 3 The structure diagram of an application embodiment provided by the present application can specifically include the following steps:
[0087] Step 1: Assemble the block chain LBS conversion service alliance chain:
[0088] Led by the regulatory department, the block chain LBS conversion service alliance chain is assembled, and the alliance chain participants include a number of regulatory nodes and operating system service provider nodes. On the side of the regulatory node, a full storage method is used to record all the LBS conversion service records stored by the operating system service provider nodes, and on the side of the operating system service provider, a minimal storage method is used to store only the LBS conversion service records related to itself.
[0089] Step 2: Mobile phones, cars and other access devices send location information:
[0090] Mobile phones, cars and other Internet of Things terminals send location information and service requests to the block chain LBS conversion service device, and the key information fields include "device real Mac address, LBS location information, location service request type: request to return the weather information of the current location to the device end, location service provider: IOS operating system".
[0091] Step 3: The block chain LBS conversion service converts the device real Mac address into a device temporary Mac address:
[0092] The blockchain LBS conversion service chains the location service request information sent by the Internet of Things terminal such as a mobile phone and a car, and automatically replaces the "real Mac address of the device" with a "temporary Mac address of the device" through a smart contract, wherein the temporary Mac address of the device comes from a "pool of Mac addresses on the chain", and the pool randomly stores the "unused" state of the Mac address. When the smart contract automatically randomly extracts a Mac address from the "pool of Mac addresses on the chain" as the "temporary Mac address of the device", the state of the address is updated to "in use".
[0093] The blockchain LBS conversion service sends a location service request to a designated location service provider through an off-chain monitoring mechanism, and the key information fields include "temporary Mac address of the device", "LBS location information", "location service request type: request to return the weather information of the current location to the device end", and "location service provider: IOS operating system".
[0094] Step 4: IOS, Android, and other operating systems receive the location information after LBS conversion:
[0095] The IOS operating system receives the location service request sent by the blockchain LBS conversion service, and the key information fields include "temporary Mac address of the device", "LBS location information", "location service request type: request to return the weather information of the current location to the device end", and "location service provider: IOS operating system".
[0096] Step 5: IOS, Android, and other operating systems return location service information:
[0097] The IOS operating system returns the location service information to the blockchain LBS conversion service device according to the location service request type, and the key information fields include "temporary Mac address of the device" and "returned location service request information: the weather information of the current location is minus 12 degrees Celsius".
[0098] Step 6: The blockchain LBS conversion service converts the temporary Mac address of the device to the real Mac address of the device:
[0099] The blockchain LBS conversion service chains the location service information returned by the IOS operating system, and automatically replaces the "temporary Mac address of the device" with the "real Mac address of the device" through a smart contract.
[0100] The blockchain LBS conversion service sends location service information to a specified device through an off-chain monitoring mechanism. Key information fields include "device real Mac address, returned location service request information: current location weather information is minus 12 degrees Celsius". At the same time, the smart contract automatically releases the "device temporary Mac address" to the "unused" state and reenters the "on-chain Mac address pool".
[0101] Step 7: The access device such as a mobile phone or a car receives the LBS-converted location service information.
[0102] The access device such as a mobile phone or a car receives the blockchain LBS-converted location service information. Key information fields include "device real Mac address, returned location service request information: current location weather information is minus 12 degrees Celsius". The information is used for user-oriented information display and service provision.
[0103] Next, a location-based service data processing apparatus provided by an embodiment of the present application is described. The location-based service data processing apparatus described below can be referred to the location-based service data processing method described above.
[0104] Referring to Figure 4 , a structure diagram of a location-based service data processing apparatus according to an example embodiment is shown, as Figure 4 shown, comprising:
[0105] The first receiving module 401 is configured to receive a location service request sent by an Internet of Things terminal. The location service request includes a real address of the Internet of Things terminal, location information, a location service request type, and a location service provider.
[0106] The first replacement module 402 is configured to replace the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and send the replaced location service request to the location service provider.
[0107] The second receiving module 403 is configured to receive a location service response sent by the location service provider. The location service response includes the temporary address and response information generated by the location service provider based on the location information and the location service request type.
[0108] The second replacement module 404 is configured to replace the temporary address in the location service response with the real address by using the smart contract, and send the replaced location service response to the Internet of Things terminal.
[0109] The position-based service data processing apparatus provided in the embodiments of the present application realizes communication between the Internet of Things terminal and the location service provider by using the blockchain. Specifically, the Internet of Things terminal sends a location service request to the blockchain, the blockchain replaces the real address of the Internet of Things terminal in the location service request with a temporary address by using the smart contract, and sends the location service request after the replacement to the location service provider. The location service provider returns a location service response to the blockchain based on the location information in the location service request and the response information generated based on the type of the location service request. The blockchain replaces the temporary address of the Internet of Things terminal in the location service response with the real address by using the smart contract, and returns the location service response after the replacement to the Internet of Things terminal. As can be seen, the position-based service data processing apparatus provided in the embodiments of the present application realizes replacement of the real address of the Internet of Things terminal by using the smart contract in the blockchain, thereby playing a role of isolating the location service provider from obtaining the real address of the Internet of Things terminal. On the premise that the real address of the Internet of Things terminal is protected from being obtained by the location service provider, the position-based service can still be completed, and the return of the location service response is realized.
[0110] On the basis of the above-mentioned embodiments, as a preferred implementation manner, the first replacement module 402 comprises:
[0111] a first replacement unit, configured to replace the real address of the Internet of Things terminal in the location service request with a temporary address in the on-chain address pool by using the smart contract, and update the state of the temporary address to in use;
[0112] a recording unit, configured to record the correspondence between the real address and the temporary address in the smart contract;
[0113] a first sending unit, configured to send the location service request after the replacement to the location service provider;
[0114] Correspondingly, the second replacement module 404 comprises:
[0115] a second replacement unit, configured to replace the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract;
[0116] a second sending unit, configured to send the location service response after the replacement to the Internet of Things terminal.
[0117] On the basis of the above-mentioned embodiments, as a preferred implementation manner, the first replacement unit is specifically a unit that replaces the real address of the Internet of Things terminal in the location service request with a temporary address in the on-chain address pool in a state of not being used by using the smart contract, and updates the state of the temporary address to in use;
[0118] Correspondingly, the second replacement module 404 further includes:
[0119] an updating unit, configured to update the state of the temporary address to unused.
[0120] On the basis of the above-mentioned embodiments, as a preferred implementation form, the first replacement module 402 further includes:
[0121] a deleting unit, configured to delete the temporary address from the on-chain address pool;
[0122] Correspondingly, the second replacement module 404 further includes:
[0123] a joining unit, configured to re-join the temporary address to the on-chain address pool.
[0124] On the basis of the above-mentioned embodiments, as a preferred implementation form, the blockchain includes a service node corresponding to the location service provider;
[0125] The first replacement module 402 is specifically a module for replacing the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and sending the replaced location service request to the location service provider through the corresponding service node;
[0126] The second receiving module 403 is specifically a module for receiving the location service response sent by the location service provider through the corresponding service node.
[0127] On the basis of the above-mentioned embodiments, as a preferred implementation form, the blockchain further includes a supervision node corresponding to a supervision department;
[0128] The device further includes:
[0129] a first sending module, configured to send the location service request to the supervision node after receiving the location service request sent by the Internet of Things terminal;
[0130] a second sending module, configured to send the location service response to the supervision node after receiving the location service response sent by the location service provider.
[0131] On the basis of the above-mentioned embodiments, as a preferred implementation form, the location service provider includes an operating system.
[0132] As to the device in the above-mentioned embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and will not be described in detail here.
[0133] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the application, the embodiment of the application further provides an electronic device, Figure 5 A structural diagram of an electronic device according to an exemplary embodiment is shown in FIG. 1. As shown in FIG. 1, the electronic device includes: Figure 5
[0134] A communication interface 1 capable of information interaction with other devices such as network devices and the like;
[0135] A processor 2 connected with the communication interface 1 to implement information interaction with other devices, for running a computer program, and executing the location-based service data processing method provided by one or more technical solutions described above. The computer program is stored on a memory 3.
[0136] Of course, in actual applications, various components in the electronic device are coupled together through a bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between the components. The bus system 4 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system 4 in the Figure 5
[0137] The memory 3 in the embodiment of the application is used to store various types of data to support the operation of the electronic device. Examples of these data include: any computer program used to operate on the electronic device.
[0138] It can be understood that the memory 3 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 2 described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memories.
[0139] The method disclosed in the embodiments of the present application can be applied to or implemented by the processor 2. The processor 2 can be an integrated circuit chip having a processing capability of signals. In the implementation, each step of the method can be completed by integrated logic circuits of hardware in the processor 2 or instructions in the form of software. The processor 2 described above can be a general processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 2 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the present application, the execution can be directly completed by a hardware decoding processor or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 3. The processor 2 reads the program in the memory 3 and combines the hardware to complete the steps of the foregoing method.
[0140] The processor 2 implements the corresponding flow in each method of the embodiments of the present application when executing the program. For brevity, the foregoing will not be repeated here.
[0141] In the exemplary embodiments, the embodiments of the present application also provide a storage medium, i.e., a computer storage medium, specifically a computer readable storage medium, such as the memory 3 storing a computer program, which can be executed by the processor 2 to complete the steps of the foregoing method. The computer readable storage medium can be an FRAM, a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disc, or a CD-ROM, etc.
[0142] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium. When the program is executed, the steps of the method embodiments are executed. The storage medium includes a mobile storage device, a ROM, a RAM, a magnetic disc or an optical disc, etc. various storage medium that can store program codes.
[0143] Alternatively, the above-mentioned integrated units of the present application, if realized in the form of software function modules and sold or used as independent products, can also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: mobile storage devices, ROM, RAM, magnetic disks or optical disks, and various media that can store program codes.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of processing location-based service data, characterized by, Applied to a blockchain, comprising: receiving a location service request sent by an Internet of Things terminal; wherein the location service request includes a real address, location information, a location service request type and a location service provider of the Internet of Things terminal; using a smart contract to replace the real address of the Internet of Things terminal in the location service request with a temporary address, and sending the replaced location service request to the location service provider; receiving a location service response sent by the location service provider; wherein the location service response includes the temporary address, and response information generated by the location service provider based on the location information and the location service request type; using the smart contract to replace the temporary address in the location service response with the real address, and sending the replaced location service response to the Internet of Things terminal; wherein the using the smart contract to replace the real address of the Internet of Things terminal in the location service request with a temporary address comprises: using the smart contract to select a temporary address in an on-chain address pool, and replacing the real address of the Internet of Things terminal in the location service request with the temporary address; recording the correspondence between the real address and the temporary address in the smart contract; correspondingly, the using the smart contract to replace the temporary address in the location service response with the real address comprises: replacing the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract.
2. The method of claim 1, wherein the location-based service data is transmitted to the mobile terminal in a form of a text message. The using the smart contract to select a temporary address in an on-chain address pool, and replacing the real address of the Internet of Things terminal in the location service request with the temporary address comprises: using the smart contract to select a temporary address in an on-chain address pool, and replacing the real address of the Internet of Things terminal in the location service request with the temporary address; updating the state of the temporary address to in use; correspondingly, after the replacing the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract, further comprising: updating the state of the temporary address to not in use. After replacing the real address of the Internet of Things terminal in the location service request with the temporary address, further comprising:
3. The method of claim 1, wherein the location-based service data is transmitted to the mobile terminal in a form of a text message. deleting the temporary address from the on-chain address pool; correspondingly, after the replacing the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract, further comprising: re-adding the temporary address to the on-chain address pool. The blockchain includes a service node corresponding to the location service provider; 4. The position-based service data processing method of claim 1, wherein, The sending the replaced location service request to the location service provider comprises: sending the replaced location service request to the location service provider through the corresponding service node; The receiving the location service response sent by the location service provider comprises: receiving the location service response sent by the location service provider through the corresponding service node. The blockchain further includes a supervision node corresponding to a supervision department; 5. The position-based service data processing method of claim 4, wherein, The receiving the location service request sent by the Internet of Things terminal further comprises: sending the location service request to the supervision node; The receiving the location service response sent by the location service provider further comprises: sending the location service response to the supervision node.
6. The position-based service data processing method of claim 1, wherein, The location service provider comprises an operating system.
7. A location-based service data processing apparatus characterized by comprising: Applied to a blockchain, comprising: A first receiving module is configured to receive a location service request sent by an Internet of Things terminal. The location service request comprises a real address, location information, a location service request type, and a location service provider of the Internet of Things terminal. A first replacement module is configured to replace the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and send the replaced location service request to the location service provider. A second receiving module is configured to receive a location service response sent by the location service provider. The location service response comprises the temporary address and response information generated by the location service provider based on the location information and the location service request type. A second replacement module is configured to replace the temporary address in the location service response with the real address by using the smart contract, and send the replaced location service response to the Internet of Things terminal. The first replacement module comprises: A first replacement unit is configured to select a temporary address in an on-chain address pool by using the smart contract, and replace the real address of the Internet of Things terminal in the location service request with the temporary address. A recording unit is configured to record a correspondence between the real address and the temporary address in the smart contract. A first sending unit is configured to send the replaced location service request to the location service provider. Correspondingly, the second replacement module comprises: A second replacement unit is configured to replace the temporary address in the location service response with the real address based on the correspondence recorded in the smart contract. A second sending unit is configured to send the replaced location service response to the Internet of Things terminal.
8. The position-based service data processing apparatus according to claim 7, wherein The first replacement unit is specifically configured to select a temporary address in the on-chain address pool by using the smart contract, replace the real address of the Internet of Things terminal in the location service request with the temporary address, and update the state of the temporary address to be in use. Correspondingly, the second replacement module further comprises: An updating unit is configured to update the state of the temporary address to be not in use.
9. The position-based service data processing apparatus according to claim 7, wherein The first replacement module further comprises: A deleting unit is configured to delete the temporary address from the on-chain address pool. Correspondingly, the second replacement module further comprises: An adding unit is configured to re-add the temporary address to the on-chain address pool.
10. The position-based service data processing apparatus according to claim 7, wherein, The blockchain comprises a service node corresponding to the location service provider. The first replacement module is specifically configured to replace the real address of the Internet of Things terminal in the location service request with a temporary address by using a smart contract, and send the replaced location service request to the location service provider through the corresponding service node. The second receiving module is specifically a module for receiving a location service response sent by the location service provider through a corresponding service node.
11. The position-based service data processing apparatus according to claim 10, wherein, The blockchain further includes a supervision node corresponding to a supervision department. The device further includes: A first sending module, configured to send the location service request to the supervision node after receiving the location service request sent by the Internet of Things terminal; A second sending module, configured to send the location service response to the supervision node after receiving the location service response sent by the location service provider.
12. The position-based service data processing apparatus according to claim 7, wherein The location service provider includes an operating system.
13. An electronic device, comprising: The device further includes: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the steps of the location-based service data processing method according to any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the steps of the location-based service data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Service data processing method and device, node structure and electronic equipment
CN112243045A