Communication method, device, electronic device and readable storage medium
By introducing the mapping relationship between virtual addresses and physical addresses in the Beidou communication system, the problem of changing the physical address of Beidou terminal requires modification of the communication program configuration file, and a more flexible communication method and better system maintenance are achieved.
Patent Information
- Application Number
- CN202210479897.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-05-05
AI Technical Summary
In the existing Beidou communication technology, changes in the physical address of the Beidou terminal require modification of the configuration file of the communication program, resulting in a large amount of development work and is not conducive to the expansion and maintenance of the system.
Introduce the mapping relationship between virtual addresses and physical addresses, determine the physical address based on the virtual address through the address management server, and update the address mapping relationship to adapt to changes in the physical address, avoiding modifying the configuration file of the communication program.
It improves the flexibility of Beidou terminal communication, reduces development workload, and is conducive to the expansion and maintenance of Beidou short message communication system.
Smart Images

Figure CN114900495B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Beidou communication technology, and in particular to a communication method, device, electronic equipment and readable storage medium. Background Art
[0002] With the rapid development of Beidou communication technology, more and more users have begun to use the Beidou short message system for communication. Especially in some remote areas where there are no public network systems and private networks, the Beidou short message system has become a very effective way of data transmission.
[0003] At present, Beidou communication technology is implemented through "point-to-point" communication based on the SIM card number carried by the Subscriber Identity Module (SIM) installed on the Beidou terminal. The SIM card number can usually be regarded as the physical address of the Beidou terminal. In other words, the communication program on the Beidou terminal is developed based on the physical address. Once the SIM card is replaced (or the SIM card is damaged, or the priority of the SIM card is changed), the physical address of the Beidou terminal is changed, and the configuration file of the communication program on the Beidou terminal needs to be modified. This approach is not conducive to the expansion and maintenance of subsequent communication programs. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, the embodiments of the present invention provide a communication method, an apparatus, an electronic device and a computer-readable storage medium to increase the flexibility of Beidou terminal communication and facilitate expansion and maintenance.
[0005] The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a communication method, which is applied to an address management server, wherein the address management server is communicatively connected with a plurality of Beidou terminals, wherein the plurality of Beidou terminals include a sending terminal and a receiving terminal, and the method includes:
[0007] receiving a query request sent by the sending terminal, wherein the query request includes a virtual address of the receiving terminal;
[0008] Determine the physical address of the receiving terminal according to the virtual address of the receiving terminal and a pre-stored address mapping relationship, wherein the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal;
[0009] The physical address of the receiving terminal is returned to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0010] In an optional implementation manner, the address mapping relationship includes a plurality of information entries, one of the information entries includes a virtual address and a physical address, each of the information entries is provided with a corresponding valid time interval, and the method further includes:
[0011] For any target information entry among the multiple information entries, if the current time is within the valid time interval corresponding to the target information entry, and a heartbeat packet including the virtual address and physical address of the target information entry is received, the valid time interval corresponding to the target information entry is adjusted according to the preset strategy.
[0012] In an optional implementation manner, the address mapping relationship includes information entries, each of the information entries is provided with a corresponding valid time interval, and the method further includes:
[0013] If the current time is not within the valid time interval corresponding to the information entry, the information entry is deleted.
[0014] In an optional embodiment, the method further comprises:
[0015] Receive virtual address, physical address and update command sent by any Beidou terminal;
[0016] The address mapping relationship is updated according to the received virtual address, the physical address and the update instruction.
[0017] In an optional implementation manner, the address mapping relationship includes a plurality of information entries, one of the information entries includes a virtual address and a physical address, and the step of updating the address mapping relationship according to the received virtual address, the physical address and the update instruction includes:
[0018] If the update instruction is a delete instruction, deleting a target information entry from the multiple information entries to update the address mapping relationship, wherein the virtual address and the physical address of the target information entry are the same as the received virtual address and the physical address;
[0019] If the update instruction is a replace virtual address instruction, the virtual address of a target information entry among the multiple information entries is replaced with the received virtual address to update the address mapping relationship, wherein the physical address of the target information entry is the same as the received physical address;
[0020] If the update instruction is a replace physical address instruction, the physical address of the target information entry among the multiple information entries is replaced with the received physical address to update the address mapping relationship, wherein the virtual address of the target information entry is the same as the received virtual address;
[0021] If the update instruction is an add instruction, a new information entry is generated according to the received virtual address and the physical address, and the new information entry is added to the address mapping relationship to update the address mapping relationship.
[0022] In a second aspect, the present invention provides a communication method, which is applied to a sending terminal in a plurality of Beidou terminals, wherein the plurality of Beidou terminals further include a receiving terminal, and both the sending terminal and the receiving terminal are communicatively connected to an address management server, the method comprising:
[0023] Sending a query request to the address management server, wherein the query request includes the virtual address of the receiving terminal;
[0024] Receiving the physical address of the receiving terminal returned by the address management server, wherein the physical address of the receiving terminal is determined by the address management server according to the virtual address of the receiving terminal and a pre-stored address mapping relationship, and the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal;
[0025] The message to be sent is sent to the receiving terminal according to the physical address of the receiving terminal.
[0026] In an optional embodiment, the method further comprises:
[0027] generating an information entry according to the virtual address and the physical address of the receiving terminal;
[0028] Saving the information entry and setting a valid time interval for the information entry;
[0029] Within the valid time interval, if the information entry is used, the valid time interval corresponding to the information entry is adjusted according to a preset policy.
[0030] In a third aspect, the present invention provides a communication device, applied to an address management server, wherein the address management server is communicatively connected to a plurality of Beidou terminals, wherein the plurality of Beidou terminals include a sending terminal and a receiving terminal, and the device includes:
[0031] A first receiving module, configured to receive a query request sent by the sending terminal, wherein the query request includes a virtual address of the receiving terminal;
[0032] A determination module, used to determine the physical address of the receiving terminal according to the virtual address of the receiving terminal and a pre-stored address mapping relationship, wherein the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal;
[0033] The first sending module is used to return the physical address of the receiving terminal to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0034] In a fourth aspect, the present invention provides a communication device, which is applied to a sending terminal among a plurality of Beidou terminals, wherein the plurality of Beidou terminals further include a receiving terminal, wherein both the sending terminal and the receiving terminal are communicatively connected to an address management server, and the device comprises:
[0035] A second sending module, configured to send a query request to the address management server, wherein the query request includes the virtual address of the receiving terminal;
[0036] A second receiving module is used to receive the physical address of the receiving terminal returned by the address management server, wherein the physical address of the receiving terminal is determined by the address management server according to the virtual address of the receiving terminal and a pre-stored address mapping relationship, and the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal;
[0037] The second sending module is further used to send the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0038] In a fifth aspect, the present invention provides an electronic device comprising: a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute a method as described in any one of the aforementioned implementation modes when calling the computer program, or execute a method as described in any one of the aforementioned implementation modes.
[0039] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any one of the foregoing embodiments is implemented, or the method described in any one of the foregoing embodiments is implemented.
[0040] Compared with the prior art, the embodiments of the present invention provide a communication method, device, electronic device and readable storage medium. First, a query request sent by a sending terminal is received, and the query request includes a virtual address of the receiving terminal; then, the physical address of the receiving terminal is determined according to the virtual address of the receiving terminal and the pre-stored address mapping relationship, and the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal; finally, the physical address of the receiving terminal is returned to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal. Since the Beidou terminal in the embodiment of the present invention has a virtual address and a physical address, the communication program on the Beidou terminal is developed based on the virtual address, and the physical address is determined according to the address mapping relationship. When the physical address of the Beidou terminal changes, the communication between the Beidou terminals can be realized by modifying the address mapping relationship, avoiding the modification of the configuration file of the communication program on the Beidou terminal, reducing the development workload, and also facilitating the expansion and maintenance of the Beidou short message communication system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A schematic diagram of the structure of a Beidou short message system provided by an embodiment of the present invention;
[0043] Figure 2 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0044] Figure 3 A flow chart of a communication method applied to an address management server provided in an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of a flow chart of a method for controlling the validity of information items provided by an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of a flow chart of a method for updating an address mapping relationship provided by an embodiment of the present invention;
[0047] Figure 6 A schematic flow chart of an implementation method of step S122 provided in an embodiment of the present invention;
[0048] Figure 7 A schematic flow chart of a communication method applied to a sending terminal provided in an embodiment of the present invention;
[0049] Figure 8 A schematic diagram of a flow chart of a method for controlling the validity of a local information entry provided by an embodiment of the present invention;
[0050] Fig. 9 A block diagram of a communication device applied to an address management server provided by an embodiment of the present invention;
[0051] Fig.10 A block diagram of a communication device applied to a sending terminal provided by an embodiment of the present invention.
[0052] Icons: 100 - electronic device; 110 - memory; 120 - processor; 200 - communication device applied to address management server; 201 - first receiving module; 202 - determination module; 203 - first sending module; 204 - adjustment module; 205 - update module; 300 - communication device applied to sending terminal; 301 - second sending module; 302 - second receiving module; 303 - cache module. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0054] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0056] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0057] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0058] In order to avoid adapting the changed physical address by modifying the configuration file of the communication program on the Beidou terminal, an embodiment of the present invention provides a communication method, device, electronic device and readable storage medium, which will be described in detail below.
[0059] Please refer to Figure 1 , Figure 1 A structural schematic diagram of a Beidou communication system provided by an embodiment of the present invention is shown. The Beidou communication system includes multiple Beidou terminals and an address management server. Any Beidou terminal can communicate with other Beidou terminals via Beidou satellites, and multiple Beidou terminals communicate with the address management server via Beidou satellites.
[0060] Any Beidou terminal can be used as a sending terminal to send messages and / or data packets to other Beidou terminals, or as a receiving terminal to receive messages and / or data packets from other Beidou terminals. The sending terminal sends the message and / or data packet to the receiving terminal according to the physical address of the receiving terminal. The Beidou terminal can be a Beidou communication device carrying a SIM card, and the card number of its SIM card can be used as the physical address of the Beidou terminal. Each Beidou terminal is provided with a virtual address corresponding to its physical address. The configuration files of the communication programs on all Beidou terminals are developed based on the virtual address.
[0061] The address management server stores the correspondence between the physical address and the virtual address of each Beidou terminal. The storage form can be a database or a text file. The correspondence between the physical address and the virtual address of each Beidou terminal can also be saved in the cache area of the server. The sending terminal can obtain the physical address of the receiving terminal from the address management server according to the virtual address of the receiving terminal. The address management server can be a physical server, or one or more program modules on a device, or a virtual machine or container running on a device.
[0062] Figure 2 A schematic block diagram of the structure of an electronic device 100 provided in an embodiment of the present invention is shown. The electronic device 100 may be Figure 1 The Beidou terminal serving as a sending terminal, or an address management server, the electronic device 100 may include a memory 110 and a processor 120.
[0063] The processor 120 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a network processor (NP), a digital signal processor (DSP), a field programmable gate array (FPGA) or other editable logic device, or a transistor logic device, or a discrete hardware component. Each step of the following method may be completed by an integrated logic circuit of hardware in the processor 120 or by instructions in the form of software.
[0064] The memory 110 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 110 may exist independently and be connected to the processor 120 via a communication bus. The memory 110 may also be integrated with the processor 120. Among them, the memory 110 is used to store machine executable instructions for executing the scheme of the present application. The processor 120 is used to execute the machine executable instructions stored in the memory 110 to implement the following embodiments of the communication method applied to the address management server or the communication method applied to the sending terminal.
[0065] Since the electronic device 100 provided in the embodiment of the present invention is another implementation form of the communication method applied to the address management server provided in the following method embodiment, or the communication method applied to the sending terminal, the technical effects that can be obtained can be referred to the following method embodiment and will not be repeated here.
[0066] Please refer to Figure 3 , Figure 3 A schematic diagram of a communication method provided by an embodiment of the present invention is shown, and its execution subject is Figure 1 The address management server in the method includes steps S101, S102 and S103.
[0067] S101, receiving a query request sent by a sending terminal.
[0068] The query request includes the virtual address of the receiving terminal. The physical address of the address management server is known to all Beidou terminals. When the sending terminal needs to send a message to the receiving terminal, the sending terminal only knows the virtual address of the receiving terminal, but not its physical address. In order to know the physical address of the receiving terminal, the sending terminal sends a query request to the address management server, which carries the virtual address of the receiving terminal.
[0069] Optionally, the virtual address and physical address of the receiving terminal may be bound in a static or dynamic manner.
[0070] S102, determining the physical address of the receiving terminal according to the virtual address of the receiving terminal and a pre-stored address mapping relationship.
[0071] The address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal. For example, the virtual address of a Beidou terminal is A001.0001.0010.0086, and the physical address is 111,1111. In the address mapping relationship, A001.0001.0010.0086 corresponds to 111,1111. The address management server uses the physical address that has a corresponding relationship with the virtual address of the receiving terminal as the physical address of the receiving terminal according to the address mapping relationship stored in the local database, local file, or buffer.
[0072] S103, returning the physical address of the receiving terminal to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0073] Among them, the address management server can return the physical address of the receiving terminal as the content of the message to the sending terminal in the form of a message, or it can package the physical address of the receiving terminal and return it to the sending terminal, so that the sending terminal can send the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0074] It should be noted that the receiving terminal can be one or a receiving terminal group composed of multiple receiving terminals, and the receiving terminal group corresponds to a virtual group address. The sending terminal can send a short message to the receiving terminal group through the virtual group address. For example, the virtual group address is FFFF.0001.0028.0086, which means that each Beidou terminal with a virtual address of 0000.0001.028.0086 to FFFE.0001.0028.0086 is used as a receiving terminal to receive the message and / or data packet sent by the sending terminal. The sending terminal can send the virtual group address as the content of the query request to the address management server. The address management server determines the physical address of the receiving terminal corresponding to each virtual address based on the virtual group address and the pre-stored address mapping relationship, and generates a virtual group address-physical address list, and then packages the virtual group address-physical address list and returns it to the sending terminal, so that the sending terminal uses the physical address of each receiving terminal to send the message to be sent one by one.
[0075] It should be noted that the virtual group address represents an address range, and there may be virtual addresses in the address range that are not assigned to Beidou terminals, that is, virtual addresses that do not meet the requirements. There is no corresponding physical address for this type of virtual address. The address management server can only determine the physical address of the receiving terminal corresponding to each virtual address that meets the requirements based on the virtual group address and the pre-stored address mapping relationship. For example, a virtual group address includes 100 virtual addresses, of which only 20 virtual addresses meet the requirements. The address management server returns a virtual group address-physical address list generated by these 20 virtual addresses and their corresponding physical addresses.
[0076] The above method provided by the embodiment of the present invention has the beneficial effect that the Beidou terminal has a virtual address and a physical address, the configuration file of the communication program on the Beidou terminal is developed based on the virtual address, and the physical address is determined according to the address mapping relationship. When the physical address of the Beidou terminal changes, communication between Beidou terminals can be achieved by modifying the address mapping relationship, avoiding modification of the configuration file of the communication program on the Beidou terminal, reducing the development workload, and also facilitating the expansion and maintenance of the Beidou short message communication system.
[0077] Generally, there is no dedicated person to maintain Beidou terminals working in the field. Once a device fails to work properly, other Beidou terminals will continue to send short messages and / or data packets to the abnormal device because they are not notified in time. In order to avoid this situation, the address management server sets a valid time interval for each information item included in the pre-stored address mapping relationship, that is, each information item is only valid within a specific time interval. The above problem is solved by controlling the valid time interval of each information item. Please refer to Figure 4 , Figure 4 A schematic flow chart of a method for controlling the validity of information items provided by an embodiment of the present invention is shown. The method further includes steps S111 and S112.
[0078] S111, for any target information item among the multiple information items, if the current time is within the valid time interval corresponding to the target information item, and a heartbeat packet including the virtual address and physical address of the target information item is received, the valid time interval corresponding to the target information item is adjusted according to a preset strategy.
[0079] The pre-stored address mapping relationship includes multiple information entries, one information entry represents the correspondence between the virtual address and the physical address of a Beidou terminal, that is, each information entry is composed of the virtual address and the physical address of a Beidou terminal. Each Beidou terminal sends a "heartbeat packet" to the address server to inform the address management server of the operating status, and the content of the heartbeat packet is the virtual address and the physical address of the Beidou terminal. The target information entry can be any one of the multiple information entries.
[0080] The address management server parses each received heartbeat packet. For each heartbeat packet, if the virtual address and physical address in the content of the heartbeat packet are the same as the virtual address and physical address of the target information item in the multiple information items, and the current time is within the valid time interval of the target information item, it means that the Beidou terminal corresponding to the target information item is operating normally, then the valid time interval of the target information item is adjusted according to the preset policy. The preset policy can be to reset the valid time interval or extend the valid time interval.
[0081] For example, the target information entry is "A001.0001.0010.0086-111,1111", and its valid time interval is [13:20, 14:20]. At 13:25, the address server receives a heartbeat packet with the content of A001.0001.0010.0086 and 111,1111. If the preset policy is to reset the valid time interval, the valid time interval of the target information entry "A001.0001.0010.0086-111,1111" is adjusted to [13:25, 14:25]. If the preset policy is to extend the valid time interval, the valid time interval of the target information entry "A001.0001.0010.0086-111,1111" is adjusted to [13:20, 14:50], which is extended by 30 minutes.
[0082] S112: If the current time is not within the valid time interval corresponding to the information entry, the information entry is deleted.
[0083] In the embodiment of the present invention, the address management server monitors the effective time interval of each information item, and deletes any information item when its effective time interval ends.
[0084] When there is a new Beidou terminal online, or a Beidou terminal is about to go offline, or the virtual address and / or physical address of the Beidou terminal is changed, in order to ensure the normal communication of the Beidou communication system, the Beidou terminal sends the current virtual address and physical address to the address management server to update the address mapping relationship stored in the address management server. Update types include deletion, replacement and addition. Please refer to Figure 5 , Figure 5 A schematic flow chart of an address mapping relationship updating method provided in an embodiment of the present invention is shown. The method further includes steps S121 and S122.
[0085] S121, receiving a virtual address, a physical address and an update instruction sent by any Beidou terminal.
[0086] The Beidou terminal sends its virtual address, physical address and update instruction to the address management server in the form of a short message or a data packet. The update instruction can be a delete instruction, a replace virtual address instruction, a replace physical address instruction or an add instruction, which is used to instruct the address management server to perform corresponding update operations on the information items in the address mapping relationship.
[0087] S122, updating the address mapping relationship according to the received virtual address, physical address and update instruction.
[0088] The embodiment of the present invention also provides an implementation method of step S122, please refer to Figure 6 , Figure 6 A flowchart of an implementation method of step S122 provided in an embodiment of the present invention is shown, where step S122 includes sub-steps S122-1 to S122-4.
[0089] S122-1, if the update instruction is a delete instruction, delete the target information entry from the multiple information entries to update the address mapping relationship.
[0090] The virtual address and physical address of the target information entry are the same as the received virtual address and physical address. The deletion instruction is used to instruct the address management server to perform a deletion operation, and the deletion object is the target information entry.
[0091] When any Beidou terminal goes offline, its virtual address and physical address will be sent to the address management server together with the deletion instruction before shutting down, so as to inform the address management server to delete the target information entry composed of the virtual address and physical address of the Beidou terminal, thereby completing the update of the address mapping relationship.
[0092] S122-2, if the update instruction is a replace virtual address instruction, the virtual address of the target information entry in the multiple information entries is replaced with the received virtual address to update the address mapping relationship.
[0093] The physical address of the target information item is the same as the received physical address. The instruction to replace the virtual address is used to instruct the address management server to perform a replacement operation, and the replacement object is the virtual address of the target information item.
[0094] When any Beidou terminal changes its virtual address, its physical address and new virtual address, together with the instruction to replace the virtual address, will be sent to the address management server to inform the address management server to replace the target information entry composed of the physical address and the original virtual address of the Beidou terminal with the information entry composed of the physical address and the new virtual address of the Beidou terminal, thereby completing the update of the address mapping relationship.
[0095] For example, the physical address of any Beidou terminal is 111,1111, the original virtual address is A001.0001.0010.0086, and the new virtual address after the change is FFFF.0001.0028.0086. The Beidou terminal sends FFFF.0001.0028.0086 and 111,1111, as well as the instruction to replace the virtual address to the address management server. The address management server finds the target information entry "A001.0001.0010.0086-111,1111" according to the "physical address 111,1111", and replaces A001.0001.0010.0086 in the target information entry with FFFF.0001.0028.0086 to obtain the new information entry "FFFF.0001.0028.0086-111,1111".
[0096] S122-3, if the update instruction is a physical address replacement instruction, the physical address of the target information entry in the multiple information entries is replaced with the received physical address to update the address mapping relationship.
[0097] The virtual address of the target information item is the same as the received virtual address. The replace physical address instruction is used to instruct the address management server to perform a replacement operation, and the replacement object is the physical address of the target information item.
[0098] When any Beidou terminal changes its physical address, it means that equipment replacement or upgrade has occurred at the Beidou terminal. The Beidou terminal will send its virtual address and new physical address, together with the replacement physical address instruction, to the address management server to inform the address management server to replace the target information entry composed of the virtual address and original physical address of the Beidou terminal with the information entry composed of the virtual address and new physical address of the Beidou terminal, thereby completing the update of the address mapping relationship.
[0099] For example, the virtual address of any Beidou terminal is A001.0001.0010.0086, the original physical address is 111,1111, and the new physical address after the change is 111,2222. The Beidou terminal sends A001.0001.0010.0086 and 111,2222, as well as the instruction to replace the physical address, to the address management server. The address management server finds the target information entry "A001.0001.0010.0086-111,1111" according to the "virtual address A001.0001.0010.0086", and replaces 111,1111 in the target information entry with 111,2222 to obtain the new information entry "A001.0001.0010.0086-111,2222".
[0100] S122 - 4 , if the update instruction is an add instruction, a new information entry is generated according to the received virtual address and physical address, and the new information entry is added to the address mapping relationship to update the address mapping relationship.
[0101] The adding instruction is used to instruct the address management server to perform an adding operation, and the added object is a new information entry.
[0102] When a Beidou terminal goes online for the first time, it will send its virtual address and physical address to the address management server together with the add instruction after it is turned on, so as to inform the address management server to add a target information entry consisting of the virtual address and physical address of the Beidou terminal, thereby completing the update of the address mapping relationship.
[0103] It is understandable that when performing update operations such as replacement and addition, the address management server will set a corresponding valid time interval for the obtained new information entry.
[0104] It should be noted that the virtual addresses and physical addresses of some key Beidou terminals are fixed for a long time. Usually, such Beidou terminals are maintained by dedicated personnel and have a good operating environment. The virtual addresses and physical addresses of such Beidou terminals can be written directly into the database, text file or cache area of the address management server manually. Even if the address mapping relationship needs to be changed, it can be achieved by manual maintenance on the address management server. Another way is to send the virtual address and physical address to the server in the form of a message through the Beidou terminal, thereby updating the address mapping relationship. Since the content of such messages is very important, security authentication is required. The authentication method can be "user + password", that is, by setting user permissions to ensure the security and integrity of data in data transmission.
[0105] Please refer to Figure 7 , Figure 7 Another flow chart of the communication method provided by the embodiment of the present invention is shown, and its execution subject is Figure 1 A sending terminal among multiple Beidou terminals, the method includes steps S201, S202 and S203.
[0106] S201, sending a query request to an address management server.
[0107] The query request includes the virtual address of the receiving terminal. The physical address of the address management server is known to all Beidou terminals. When the sending terminal needs to send a message to the receiving terminal, the sending terminal only knows the virtual address of the receiving terminal, but not its physical address. In order to obtain the physical address of the receiving terminal, the sending terminal sends a query request to the address management server, and the query request carries the virtual address of the receiving terminal.
[0108] S202, receiving the physical address of the receiving terminal returned by the address management server.
[0109] Among them, the physical address of the receiving terminal is determined by the address management server according to the virtual address of the receiving terminal and the pre-stored address mapping relationship. The address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal.
[0110] S203: Send the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0111] The sending terminal receives the physical address of the receiving terminal returned by the address management server in the form of a message or a data packet, and sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0112] In order to improve the efficiency of terminal communication, the Beidou terminal also saves some information items in the preset address mapping relationship in its buffer pool, and sets a valid time interval for each information item. The buffer pool is updated by controlling the valid time interval of the information item. Please refer to Figure 8 , Figure 8 A schematic flow chart of a method for controlling the validity of a local information entry provided by an embodiment of the present invention is shown. The method includes steps S211, S212 and S213.
[0113] S211, generating an information entry according to the virtual address and the physical address of the receiving terminal.
[0114] Among them, when the sending terminal sends a message to the receiving terminal for the first time, the local buffer pool of the sending terminal does not store the corresponding relationship between the virtual address and the physical address of the receiving terminal. After receiving the physical address of the receiving terminal sent by the address management server, the sending terminal generates an information entry according to the virtual address and the physical address of the receiving terminal to save it in the buffer pool. When the sending terminal sends a message to the same receiving terminal again, the physical address of the receiving terminal can be directly determined from the relevant information entry stored in the buffer pool without having to obtain it from the address management server.
[0115] S212: Save the information entry and set a valid time interval for the information entry.
[0116] If the current time is within the valid time interval of the information entry, the information entry is valid, otherwise, the information entry is invalid. When the information entry is in an invalid state, it can be deleted from the local buffer pool to release the buffer pool space occupied by it in time.
[0117] For example, the virtual address of the receiving terminal is A001.0001.0010.0086, and the physical address is 111,1111. The generated information entry "A001.0001.0010.0086-111,1111" is saved in the local buffer pool of the sending terminal, and its valid time interval is [11:30, 12:30], that is, the validity of the information entry lasts for 1 hour. After 12:30, the information entry is in an invalid state, and the information entry is deleted from the local buffer pool.
[0118] S213: If the information entry is used within the valid time interval, the valid time interval corresponding to the information entry is adjusted according to a preset policy.
[0119] Among them, the information entry being used means that the sending terminal sends a message to the receiving terminal corresponding to the physical address in the information entry. In order to prevent the frequently used information entries from becoming invalid too quickly and being deleted from the local buffer pool, the valid time interval corresponding to the information entry is adjusted according to the preset policy. For example, if any information entry is used within its valid time interval, the valid time interval of the information entry is adjusted according to the preset policy. The preset policy can be to reset the valid time interval or extend the valid time interval.
[0120] For example, the information entry is "A001.0001.0010.0086-111,1111", and its valid time interval is [13:20, 14:20]. At 13:25, the sending terminal uses the information entry to send a message to the receiving terminal with a physical address of 111,1111. If the preset policy is to reset the valid time interval, the valid time interval of the target information entry "A001.0001.0010.0086-111,1111" is adjusted to [13:25, 14:25]. If the preset policy is to extend the valid time interval, the valid time interval of the information entry is adjusted to [13:20, 14:50], which is extended by 30 minutes.
[0121] It should be noted that for any information entry, when the sending terminal fails to use it to send messages multiple times, the sending terminal deletes the information entry from the local buffer pool, obtains the physical address of the corresponding receiving terminal from the address management server again, and repeats the above steps S211 to S213.
[0122] In order to execute the corresponding steps in the above embodiment and each possible implementation method, the following provides an implementation method of a communication device 200 applied to an address management server and a communication device 300 applied to a sending terminal. Fig. 9 and Fig.10 , Fig. 9 A block diagram of a communication device 200 applied to an address management server provided in an embodiment of the present invention is shown. Fig.10 A block diagram of a communication device 300 applied to a sending terminal provided in an embodiment of the present invention is shown. It should be noted that the basic principles and technical effects of the communication device 200 applied to an address management server and the communication device 300 applied to a sending terminal provided in an embodiment of the present invention are the same as those in the above embodiments, and for the sake of brief description, the embodiments of the present invention are not mentioned.
[0123] The communication device 200 applied to the address management server includes a first receiving module 201 , a determining module 202 , a first sending module 203 , an adjusting module 204 and an updating module 205 .
[0124] The first receiving module 201 is used to receive a query request sent by a sending terminal, where the query request includes a virtual address of the receiving terminal;
[0125] A determination module 202 is used to determine the physical address of the receiving terminal according to the virtual address of the receiving terminal and a pre-stored address mapping relationship, where the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal;
[0126] The first sending module 203 is used to return the physical address of the receiving terminal to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0127] The adjustment module 204 is used to adjust the valid time interval corresponding to the target information entry according to a preset strategy for any target information entry among multiple information entries, if the current time is within the valid time interval corresponding to the target information entry, and a heartbeat packet including the virtual address and physical address of the target information entry is received, wherein the address mapping relationship includes multiple information entries, one information entry includes a virtual address and a physical address, and each information entry is set with a corresponding valid time interval.
[0128] The updating module 205 is configured to delete the information entry if the current time is not within the valid time interval corresponding to the information entry.
[0129] The update module 205 is also used to receive the virtual address, physical address and update instruction sent by any Beidou terminal; and update the address mapping relationship according to the received virtual address, physical address and update instruction.
[0130] In one implementation, the address mapping relationship includes multiple information entries, and one information entry includes a virtual address and a physical address. When the update module 205 is used to update the address mapping relationship according to the received virtual address, physical address and update instruction, it is specifically used to delete the target information entry in the multiple information entries if the update instruction is a delete instruction, so as to update the address mapping relationship, wherein the virtual address and physical address of the target information entry are the same as the received virtual address and physical address; if the update instruction is a replace virtual address instruction, then the virtual address of the target information entry in the multiple information entries is replaced with the received virtual address to update the address mapping relationship, wherein the physical address of the target information entry is the same as the received physical address; if the update instruction is a replace physical address instruction, then the physical address of the target information entry in the multiple information entries is replaced with the received physical address to update the address mapping relationship, wherein the virtual address of the target information entry is the same as the received virtual address; if the update instruction is an add instruction, then a new information entry is generated according to the received virtual address and physical address, and the new information entry is added to the address mapping relationship to update the address mapping relationship.
[0131] The communication device 300 applied to a sending terminal includes a second sending module 301 , a second receiving module 302 and a buffer module 303 .
[0132] The second sending module 301 is used to send a query request to the address management server, where the query request includes the virtual address of the receiving terminal;
[0133] A second receiving module 302 is used to receive the physical address of the receiving terminal returned by the address management server, wherein the physical address of the receiving terminal is determined by the address management server according to the virtual address of the receiving terminal and a pre-stored address mapping relationship, and the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal;
[0134] The second sending module 301 is further configured to send the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
[0135] The cache module 303 is used to generate an information entry according to the virtual address and physical address of the receiving terminal; save the information entry and set a valid time interval for the information entry; within the valid time interval, if the information entry is used, the valid time interval corresponding to the target information entry is adjusted according to the preset strategy.
[0136] An embodiment of the present invention also provides a readable storage medium containing computer executable instructions, which, when executed, can be used to perform relevant operations of the communication method applied to the address management server or the communication method applied to the sending terminal provided in the aforementioned method embodiment.
[0137] In summary, a communication method, device, electronic device and readable storage medium provided by an embodiment of the present invention, first, a query request sent by a sending terminal is received, and the query request includes a virtual address of the receiving terminal; then, according to the virtual address of the receiving terminal and the pre-stored address mapping relationship, the physical address of the receiving terminal is determined, and the address mapping relationship is used to characterize the correspondence between the virtual address and the physical address of each Beidou terminal; finally, the physical address of the receiving terminal is returned to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal. Since the Beidou terminal in the embodiment of the present invention has a virtual address and a physical address, the communication program on the Beidou terminal is developed based on the virtual address, and the physical address is determined according to the address mapping relationship. When the physical address of the Beidou terminal changes, by modifying the address mapping relationship, communication between Beidou terminals can be realized, avoiding modification of the configuration file of the communication program on the Beidou terminal, reducing the development workload, and also facilitating the expansion and maintenance of the Beidou short message communication system.
[0138] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A communication method, characterized in that: Applied to an address management server, the address management server is communicatively connected with a plurality of Beidou terminals, the physical address of the Beidou terminal is the card number of a SIM card carried by the Beidou terminal, the configuration file of the communication program on the Beidou terminal is developed based on the virtual address of the Beidou terminal, the plurality of Beidou terminals include a sending terminal and a receiving terminal, and the method includes: receiving a query request sent by the sending terminal, wherein the query request includes a virtual address of the receiving terminal; According to a pre-stored address mapping relationship, a physical address having a corresponding relationship with the virtual address of the receiving terminal is used as the physical address of the receiving terminal, wherein the address mapping relationship is used to characterize the corresponding relationship between the virtual address and the physical address of each Beidou terminal; The physical address of the receiving terminal is returned to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
2. The method according to claim 1, characterized in that The address mapping relationship includes a plurality of information entries, one of the information entries includes a virtual address and a physical address, each of the information entries is provided with a corresponding valid time interval, and the method further includes: For any target information entry among the multiple information entries, if the current time is within the valid time interval corresponding to the target information entry, and a heartbeat packet including the virtual address and physical address of the target information entry is received, the valid time interval corresponding to the target information entry is adjusted according to the preset strategy.
3. The method according to claim 1, characterized in that The address mapping relationship includes information entries, each of which is provided with a corresponding valid time interval, and the method further includes: If the current time is not within the valid time interval corresponding to the information entry, the information entry is deleted.
4. The method according to claim 1, characterized in that The method further comprises: Receive virtual address, physical address and update command sent by any Beidou terminal; The address mapping relationship is updated according to the received virtual address, the physical address and the update instruction.
5. The method according to claim 4, characterized in that The address mapping relationship includes a plurality of information entries, one of the information entries includes a virtual address and a physical address, and the step of updating the address mapping relationship according to the received virtual address, the physical address and the update instruction includes: If the update instruction is a delete instruction, deleting a target information entry from the plurality of information entries to update the address mapping relationship, wherein a virtual address and a physical address of the target information entry are the same as the received virtual address and the physical address; If the update instruction is a replace virtual address instruction, the virtual address of a target information entry among the multiple information entries is replaced with the received virtual address to update the address mapping relationship, wherein the physical address of the target information entry is the same as the received physical address; If the update instruction is a replace physical address instruction, the physical address of the target information entry among the multiple information entries is replaced with the received physical address to update the address mapping relationship, wherein the virtual address of the target information entry is the same as the received virtual address; If the update instruction is an add instruction, a new information entry is generated according to the received virtual address and the physical address, and the new information entry is added to the address mapping relationship to update the address mapping relationship.
6. A communication method, characterized in that: A sending terminal is applied to a plurality of Beidou terminals, wherein the plurality of Beidou terminals further include a receiving terminal, wherein both the sending terminal and the receiving terminal are communicatively connected to an address management server, wherein the physical address of the Beidou terminal is the card number of a SIM card carried by the Beidou terminal, and wherein a configuration file of a communication program on the Beidou terminal is developed based on a virtual address of the Beidou terminal, and wherein the method comprises: Sending a query request to the address management server, wherein the query request includes the virtual address of the receiving terminal; Receiving the physical address of the receiving terminal returned by the address management server, wherein the physical address of the receiving terminal is a physical address having a corresponding relationship with the virtual address of the receiving terminal determined by the address management server according to a pre-stored address mapping relationship, and the address mapping relationship is used to characterize the corresponding relationship between the virtual address and the physical address of each Beidou terminal; The message to be sent is sent to the receiving terminal according to the physical address of the receiving terminal.
7. The method according to claim 6, characterized in that The method further comprises: generating an information entry according to the virtual address and the physical address of the receiving terminal; Saving the information entry and setting a valid time interval for the information entry; Within the valid time interval, if the information entry is used, the valid time interval corresponding to the information entry is adjusted according to a preset policy.
8. A communication device, characterized in that: Applied to an address management server, the address management server is connected to multiple Beidou terminals in communication, the physical address of the Beidou terminal is the card number of a SIM card carried by the Beidou terminal, the configuration file of the communication program on the Beidou terminal is developed based on the virtual address of the Beidou terminal, the multiple Beidou terminals include a sending terminal and a receiving terminal, and the device includes: A first receiving module, configured to receive a query request sent by the sending terminal, wherein the query request includes a virtual address of the receiving terminal; A determination module, configured to use a physical address having a corresponding relationship with the virtual address of the receiving terminal as the physical address of the receiving terminal according to a pre-stored address mapping relationship, wherein the address mapping relationship is used to characterize the corresponding relationship between the virtual address and the physical address of each Beidou terminal; The first sending module is used to return the physical address of the receiving terminal to the sending terminal, so that the sending terminal sends the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
9. A communication device, characterized in that: A sending terminal applied to a plurality of Beidou terminals, wherein the plurality of Beidou terminals further include a receiving terminal, wherein both the sending terminal and the receiving terminal are communicatively connected to an address management server, wherein the physical address of the Beidou terminal is the card number of a SIM card carried by the Beidou terminal, and the configuration file of the communication program on the Beidou terminal is developed based on the virtual address of the Beidou terminal, and the device comprises: A second sending module, configured to send a query request to the address management server, wherein the query request includes the virtual address of the receiving terminal; A second receiving module is used to receive the physical address of the receiving terminal returned by the address management server, wherein the physical address of the receiving terminal is a physical address having a corresponding relationship with the virtual address of the receiving terminal determined by the address management server according to a pre-stored address mapping relationship, and the address mapping relationship is used to characterize the corresponding relationship between the virtual address and the physical address of each Beidou terminal; The second sending module is further used to send the message to be sent to the receiving terminal according to the physical address of the receiving terminal.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method according to any one of claims 1 to 5, or execute the method according to any one of claims 6 to 7 when calling the computer program.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented, or the method according to any one of claims 6 to 7 is implemented.
Citation Information
Patent Citations
Communication request processing method, device and system, electronic equipment and storage medium
CN113347239A
Data interaction method and device, electronic equipment and computer storage medium
CN113419810A