Method, device, equipment and storage medium for determining position relationship type
By acquiring historical data of the warning area and target users within a preset future time period, the locational relationship between the target users and the warning area is determined, solving the problem of the inability to accurately determine the user's location in real time in existing technologies, and achieving accurate disaster warning.
Patent Information
- Application Number
- CN202211412363.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-11-11
AI Technical Summary
In existing technologies, offline regional data is delayed compared to the current data, making it impossible to accurately determine in real time whether a target user is truly in a disaster warning area, leading to misjudgments.
By acquiring the warning area within a preset future time period, the target users located in the warning area within the first preset time period are identified. Combined with the current time and historical area data, the location relationship between the target users and the warning area is determined, including whether they have left, are staying, or are passing through, thereby accurately determining whether to issue a disaster warning.
It enables real-time and accurate determination of the location relationships of target users, ensuring the accuracy and effectiveness of disaster early warning.
Smart Images

Figure CN115802289B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology, and more particularly to a method, apparatus, device, and storage medium for determining positional relationship types. Background Technology
[0002] With the increasing number of users of mobile devices in today's society, researchers are using these devices to determine whether the location of the user is in an area where a disaster is about to occur.
[0003] In existing technology, the operator's server receives a preset disaster warning area sent by the disaster warning server. Then, the operator's server receives offline signaling data sent by the target user's corresponding terminal device, extracts offline area data from the offline signaling data, and matches the geographical location contained in the offline area data with the preset disaster warning area. If the preset disaster warning area includes the geographical location, it is considered that the target user is currently in the warning area, and a warning message will be sent to the target user.
[0004] Because offline area data is delayed compared to the current data and lacks real-time capability, the target user may leave the warning area after the time point corresponding to the offline area data. Consequently, the target user may no longer be in the warning area at the current time. Therefore, the existing technology cannot accurately determine whether the target user is actually in the warning area. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for determining location relationship type, in order to solve the problem of being unable to correctly determine whether a target user is actually in a warning area.
[0006] Firstly, this application provides a method for determining the type of positional relationship, including:
[0007] Obtain the warning area where a preset disaster is expected to occur within a preset future time period;
[0008] Identify target users located in the warning area within the first preset time period;
[0009] Determine the current region where the target user is located at the current time and the historical region where the target user is located in each sampling time period within the second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period.
[0010] The location relationship type between the target user and the warning area is determined based on the current area, each of the historical areas and the warning area; the location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area.
[0011] Whether to issue a disaster warning to the target user is determined based on the location relationship type.
[0012] In one approach, obtaining the early warning area for a predetermined disaster occurring within a predetermined future time period includes:
[0013] The system receives periodic warnings from a disaster warning server regarding the areas where a predetermined disaster will occur within a predetermined future time period. These warning areas include the geographical location information of the areas where the predetermined disaster will occur within the predetermined future time period.
[0014] In one approach, identifying target users located within the warning area during a first preset time period includes:
[0015] Based on the largest area within the warning zone, candidate users communicating via terminal devices within that largest area are identified; there are multiple candidate users.
[0016] Obtain the regional data sent by the terminal devices corresponding to each candidate user within a first preset time period;
[0017] Based on the regional data within the first preset time period and the warning area, the target users corresponding to each terminal device located in the warning area within the first preset time period are determined.
[0018] In one approach, determining the target users corresponding to each terminal device located in the warning area within the first preset time period based on regional data within the first preset time period and the warning area includes:
[0019] Obtain the area code table, and determine the area data within the first preset time period and the area code corresponding to the warning area based on the area code table;
[0020] The area code corresponding to the area data within the first preset time period is determined as the target area code, and the area code corresponding to the warning area is determined as the warning area code.
[0021] Match the target area code with the warning area code;
[0022] If it is determined that the warning area code includes the target area code, then it is determined that the candidate user of the terminal device corresponding to the target area code is located in the warning area during the first preset time period, and the candidate user is determined as the target user.
[0023] If it is determined that the warning area code does not include the target area code, then it is determined that the candidate user of the terminal device corresponding to the target area code is not located in the warning area during the first preset time period, and the candidate user is determined as a non-target user.
[0024] In one approach, obtaining the regional data sent by the terminal devices corresponding to each candidate user within a first preset time period includes:
[0025] Obtain signaling data sent by the terminal devices corresponding to each candidate user within a first preset time period; the signaling data includes regional data;
[0026] Extract regional data from the signaling data sent within the first preset time period.
[0027] In one approach, determining the current region where the target user is located at the current time includes:
[0028] Obtain the current time and region data of the target user's corresponding terminal device;
[0029] The current time region data is determined as the current region of the corresponding target user.
[0030] In one approach, obtaining the current time region data of the target user's corresponding terminal device includes:
[0031] Obtain the signaling data of the current time of the terminal device corresponding to the target user;
[0032] Regional data is extracted from the signaling data at the current time and used as the regional data for the target user's corresponding terminal device at the current time.
[0033] In one approach, determining the historical region located within each sampling time period of the second preset time period includes:
[0034] Acquire historical area data for each sampling point within a second preset time period for the target user's corresponding terminal device;
[0035] The historical area data of each sampling point is divided according to the sampling time period to obtain historical area data within multiple sampling time periods.
[0036] Cluster the historical region data of multiple sampling points within each sampling time period to determine the historical region within each sampling time period;
[0037] The historical region corresponding to the terminal device within each sampling time period in the second preset time period is determined as the historical region where the corresponding target user is located within each sampling time period in the second preset time period.
[0038] In one approach, determining the location relationship type between the target user and the warning area based on the current area, each of the historical areas, and the warning area includes:
[0039] Based on the regional code table, determine the current regional code corresponding to the current region and the historical regional codes corresponding to each historical region.
[0040] Match the current region code with the warning region code;
[0041] If the warning area code does not include the current area code, then the location relationship type between the target user and the warning area is determined to be "has left the warning area";
[0042] In response to the warning area code including the current area code, each historical area code is matched with the warning area code to determine the location relationship type between the target user and the warning area.
[0043] In one approach, the historical region codes are ordered chronologically; matching each historical region code with the warning region code to determine the locational relationship type between the target user and the warning region includes:
[0044] If a first preset number of consecutive historical region codes in each historical region code match the warning region code, and the first preset number is greater than the first preset number threshold, then the location relationship type between the target user and the warning region is determined to be residing in the warning region.
[0045] In response to a second preset number of consecutive historical area codes matching the warning area code in each historical area code, and the second preset number being less than a second preset number threshold, the location relationship type between the target user and the warning area is determined to be "passing through the warning area"; the first preset number threshold is greater than the second preset number threshold.
[0046] In one approach, determining whether to issue a disaster warning to the target user based on the location relationship type includes:
[0047] In response to the location relationship type indicating that the user is residing in the warning area, a disaster warning is issued to the target user using the first warning strategy.
[0048] In response to the location relationship type being "passing through the warning area", a disaster warning is issued to the target user using the second warning strategy.
[0049] In response to the location relationship type being "left the warning area", it is determined that no disaster warning will be issued for this target user.
[0050] Secondly, this application provides a device for determining the type of positional relationship, the device comprising:
[0051] The acquisition module is used to acquire the warning area where a preset disaster will occur within a preset future time period;
[0052] The first determining module is used to determine the target users located in the warning area within the first preset time period;
[0053] The second determining module is used to determine the current region where the target user is located at the current time and the historical region where the target user is located in each sampling time period within the second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period.
[0054] The third determining module is used to determine the location relationship type between the target user and the warning area based on the current area, each of the historical areas and the warning area; the location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area.
[0055] The fourth determining module is used to determine whether to issue a disaster warning to the target user based on the location relationship type.
[0056] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0057] The memory stores computer-executed instructions;
[0058] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect or any of the above methods.
[0059] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect or any of the above-described methods.
[0060] This application provides a method, apparatus, device, and storage medium for determining location relationship types, specifically including: acquiring a warning area where a preset disaster will occur within a preset future time period; identifying a target user located in the warning area within a first preset time period; determining the current area where the target user is located at the current time and the historical area where the target user is located within each sampling time period of a second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period; determining the location relationship type between the target user and the warning area based on the current area, each historical area, and the warning area; the location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area; and determining whether to issue a disaster warning to the target user based on the location relationship type. The location relationship type determination device of this application (hereinafter referred to as the location determination device) first obtains the warning area where a preset disaster will occur within a preset future time period. Then, it further determines the target user located in the warning area within the first preset time period. Since the second preset time period includes the first preset time period and the second preset time period is the most recent time period before the current time, the first preset time period is also the time period before the current time. Therefore, the target user within the first preset time period is more accurate and consistent with the current situation. Then, it determines the current area of the target user and the historical area where the target user is located within each sampling time period of the second preset time period. Since the current area has real-time and authenticity, it can accurately represent the area where the target user is currently located. The historical area is the historical area of the target user within a recent period. Although it is a historical area, it is a historical area within a recent period. Therefore, the historical area is closer to the current area and is more suitable for the user to determine the location relationship type of the target user. Thus, the location determination device will accurately determine the location relationship type between the target user and the warning area based on the current area, each historical area, and the warning area. At the same time, the location relationship type has real-time and can better reflect the current location relationship between the target user and the warning area. The location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area. Based on the determined location relationship type, which includes at least one of leaving the warning area, residing in the warning area, or passing through the warning area, it can be determined whether a disaster warning needs to be sent to the target user. Due to the accurate location relationship type, it is possible to accurately determine whether a disaster warning needs to be sent to the target user. Attached Figure Description
[0061] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0062] Figure 1 An application scenario diagram for a method for determining the type of positional relationship provided in this application;
[0063] Figure 2 This is a flowchart illustrating a method for determining the type of positional relationship provided in Embodiment 1 of this application;
[0064] Figure 3 This is a flowchart illustrating a method for determining the type of positional relationship provided in Embodiment 3 of this application;
[0065] Figure 4 This is a flowchart illustrating a method for determining the type of positional relationship provided in Embodiment 4 of this application;
[0066] Figure 5 This is a flowchart illustrating a method for determining the type of positional relationship provided in Embodiment Six of this application;
[0067] Figure 6 This is a flowchart illustrating a method for determining the type of positional relationship provided in Embodiment 7 of this application;
[0068] Figure 7 This is a flowchart illustrating a method for determining the type of positional relationship provided in Embodiment 8 of this application;
[0069] Figure 8 This is a schematic diagram of a positional relationship type determination device provided in Embodiment 9 of this application;
[0070] Figure 9 This is a schematic diagram of the structure of an electronic device provided in Embodiment 10 of this application.
[0071] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0073] In existing technology, the operator's server receives a preset disaster warning area from the disaster warning server. Then, the operator's server receives offline signaling data sent by the target user's corresponding terminal device, extracts offline area data from the offline signaling data, and matches the geographical location contained in the offline area data with the preset disaster warning area. If the preset disaster warning area includes the geographical location, it is considered that the target user is currently in the warning area. The offline area data may contain the communication identifier of the terminal device. Then, the operator's server sends a warning message to the communication identifier, and the target user's corresponding device receives the warning message, thus achieving the warning function.
[0074] Because offline area data in existing technologies is delayed compared to the current data and lacks real-time capability, the target user may leave the warning area after the time point corresponding to the offline area data. Consequently, the target user may no longer be in the warning area at the current time point, and thus existing technologies cannot accurately determine whether the target user is actually in the warning area.
[0075] To address the shortcomings of existing technologies, the inventors of this solution have creatively designed a new approach. This solution provides a method for determining location relationship types. To solve the problem of not being able to accurately determine whether a target user is truly in a warning zone, the location relationship type determination device (hereinafter referred to as the location determination device) first acquires the warning zones where a preset disaster will occur within a preset future time period. Then, it identifies target users located within the warning zones during a first preset time period, which falls within a second preset time period, and the second preset time period is the most recent time period before the current time. This ensures that the identified target users are more accurate and consistent with the situation. Next, it determines the target user's current area and the historical areas where each sampling time period within the second preset time period is located. The target user's current area is real-time, while the historical areas, although... It has already happened, but because it is a historical area within a recent period, the historical area is closer to the current area and more consistent with the actual situation. Therefore, based on the current area, each historical area, and the warning area, the location relationship type of the target with the warning area can be accurately and in real time determined. Due to its real-time nature, this location relationship type can accurately reflect the relationship with the warning area. This location relationship type includes at least one of the following: left the warning area, staying in the warning area, and passing through the warning area. Then, based on the accurately determined location relationship type, which may be at least one of left the warning area, staying in the warning area, and passing through the warning area, it can be further accurately determined whether to issue a disaster warning to the target user.
[0076] The following describes the application scenarios of the method, apparatus, device, and storage medium for determining the positional relationship type provided in this application.
[0077] Figure 1 This is an application scenario diagram for the method for determining the type of positional relationship provided in this application. For example... Figure 1 As shown in the diagram, the application scenario includes a disaster early warning server 101, an operator server 102, and terminal devices 103 corresponding to the target users. The operator server 102 includes a location relationship type determination device 104 (hereinafter referred to as the location determination device).
[0078] The terminal device 103 corresponding to the target user can be a mobile phone or other device with mobile communication function.
[0079] Among them, the disaster early warning server 101 is connected to the operator server 102, and the terminal device 103 corresponding to the target user is connected to the operator server 102. The communication connection can be a wired connection or a wireless connection.
[0080] Specifically, when a disaster is imminent, the disaster warning server 101 will send a warning area for a preset disaster to occur within a preset future time period to the operator server 102. Then, the operator server 102 will obtain the warning area for the preset disaster to occur within the preset future time period and transmit it to the location determination device 104. The location determination device 104 will then determine the target user located in the warning area within a first preset time period, wherein there is at least one target user. Next, the location determination device 104 obtains the current area where the target user is located at the current time from the terminal device 103 corresponding to the target user, as well as the historical area where the target user is located in each sampling time period within a second preset time period. Based on the current area, each historical area and the warning area, the location determination device 104 determines the location relationship type between the target user and the warning area. The location relationship type includes at least one of the following: having left the warning area, residing in the warning area, and passing through the warning area.
[0081] Furthermore, the location determination device 104 determines whether to issue a disaster warning to the target user based on the location relationship type.
[0082] Furthermore, if the location determination device 104 determines that the location relationship type is a stay warning area, then a disaster warning is issued to the target user using the first warning strategy; if the target user is passing through the warning area, then a disaster warning is issued to the target user using the second warning strategy; if the target user has left the warning area, no disaster warning is issued to the target user.
[0083] Furthermore, the location determination device 104 will issue a disaster warning to the target user using either a first warning strategy or a second warning strategy.
[0084] It should be noted that this application can implement different early warning strategies based on different location relationship types, thereby achieving better early warning results.
[0085] This application provides a method, apparatus, device, and storage medium for determining positional relationship types, aiming to solve the above-mentioned technical problems in the prior art.
[0086] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0087] Example 1
[0088] Figure 2 This is a flowchart illustrating a method for determining positional relationship types according to Embodiment 1 of this application. The executing entity of this embodiment is a positional relationship type determining device (hereinafter referred to as the position determining device), such as... Figure 2 As shown, the specific steps are as follows.
[0089] S201, Obtain the warning area where a preset disaster will occur within a preset future time period.
[0090] The preset future time period can be set in advance.
[0091] The warning area for a predetermined disaster occurring within a specified future time period refers to at least one area where a predetermined disaster is expected to occur in the near future, and this at least one area is designated as the warning area. The predetermined disaster can be any type of disaster, such as typhoons and landslides; there are no restrictions here.
[0092] S202, Identify the target users located in the warning area within the first preset time period.
[0093] The target user refers to the user of the mobile terminal device. There must be at least one target user.
[0094] The first preset time period is a short time segment pre-set within the second preset time period, which can be 5 minutes per segment. This can be set according to actual circumstances and is not limited here. The first preset time period refers to the time segment closest to the current time.
[0095] Specifically, the location determination device can determine the target user located in the warning area within the first preset time period based on regional data or other methods.
[0096] S203, determine the current region where the target user is located at the current time and the historical region where the target user is located in each sampling time period within the second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period.
[0097] The current region refers to the geographical location of the target user at the current time.
[0098] The second preset time period is a pre-set long time period closest to the current time, which can be one hour per period, depending on the actual situation. The second preset time period includes the first preset time period. It can be understood that the first preset time period is at the end of the second preset time period.
[0099] The sampling time period is a pre-defined short time interval during which historical area sampling is performed. It is understood that the second preset time period contains multiple sampling time periods, which can be equal to the first preset time period or other time periods; no restrictions are placed here.
[0100] The historical region refers to the area in which the sample was located in the past. It can be understood that there is a corresponding historical region for each sampling period.
[0101] Specifically, the target user sends the area data of the current time to the location determination device. The location determination device determines the target user's current area based on the area data of the current time. At the same time, the storage area of the target user's corresponding terminal device stores the area data of the target user within a second preset time period. The location determination device will retrieve the area data within the second preset time period from the target user's storage area and then determine the historical area of each sampling time period within the second preset time period of the target user.
[0102] S204, determine the location relationship type between the target user and the warning area based on the current area, each historical area and the warning area; the location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area.
[0103] The location relationship type refers to the location relationship between the target user and the warning area. This includes at least one of the following: having left the warning area, remaining in the warning area, or passing through the warning area.
[0104] Among them, "left the warning area" means that the target user has left the warning area at the current time; "residing in the warning area" means that the target user is residing in the warning area; and "passing through the warning area" means that the target user has only passed through the warning area.
[0105] Specifically, the location determination device will determine whether the target user is leaving the warning area, passing through the warning area, or passing through the warning area based on the current area, historical areas, and warning areas.
[0106] S205, determine whether to issue a disaster warning to the target user based on the location relationship type.
[0107] Disaster early warning refers to providing advance notice of impending disasters.
[0108] Specifically, the location determination device will determine whether to issue a disaster warning to the target user based on the type of location relationship.
[0109] Furthermore, reasonable early warning strategies should be adopted for target users who require disaster early warning.
[0110] This embodiment provides a method for determining the location relationship type, specifically including: acquiring a warning area where a preset disaster will occur within a preset future time period; identifying a target user located in the warning area within a first preset time period; determining the current area where the target user is located at the current time and the historical area where the target user is located within each sampling time period of a second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period; determining the location relationship type between the target user and the warning area based on the current area, each historical area, and the warning area; the location relationship type includes at least one of: having left the warning area, residing in the warning area, or passing through the warning area; and determining whether to issue a disaster warning to the target user based on the location relationship type. The location relationship type determination device of this application (hereinafter referred to as the location determination device) first obtains the warning area where a preset disaster will occur within a preset future time period. Then, it further determines the target user located in the warning area within a first preset time period. The first preset time period is within a second preset time period, and the second preset time period is the most recent time period before the current time. Thus, the target user within the first preset time period is more accurate and consistent with the current situation. Then, it determines the target user's current area and the historical area where the target user is located within each sampling time period of the second preset time period. Since the current area has real-time and authenticity, it can accurately represent the area where the target user is currently located. The historical area is the target user's historical area within a recent period. Although it is a historical area, it is a historical area within a recent period, so it is closer to the current area and more suitable for the user to determine the target user's location relationship type. Thus, the location determination device will accurately determine the location relationship type between the target user and the warning area based on the current area, each historical area, and the warning area. At the same time, the location relationship type has real-time and can better reflect the target user's current location relationship with the warning area. The location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area. Based on the determined location relationship type, which includes at least one of leaving the warning area, residing in the warning area, or passing through the warning area, it can be determined whether a disaster warning needs to be sent to the target user. Due to the accurate location relationship type, it is possible to accurately determine whether a disaster warning needs to be sent to the target user.
[0111] Example 2
[0112] This application embodiment is a further refinement of the above embodiment one. This embodiment is an optional method for obtaining a warning area where a preset disaster will occur within a preset future time period. The specific content is as follows.
[0113] It receives warning areas for a preset disaster to occur within a preset future time period, which are periodically sent by the disaster warning server. The warning areas include the geographical location information of the areas where the preset disaster will occur within the preset future time period.
[0114] The disaster early warning server can be a meteorological bureau server, a fire brigade server, or a server belonging to other units or enterprises.
[0115] In this context, geographic location information refers to specific geographical location information, such as a province and a city. It can be understood that the warning area can be a large area or a small area. For example, a typhoon is an extremely dangerous natural disaster that can affect multiple provinces and cities, so the geographic location information could be a province and a city, etc. Conversely, a landslide or similar event might be a smaller-scale disaster, so the geographic location information could be a province, a city, a district, and a street.
[0116] The warning area can include at least one geographical location. It is understandable that the warning area can change; therefore, to ensure that the warning area best reflects current needs, the disaster warning server can periodically send out warning areas.
[0117] Specifically, the disaster early warning server will periodically send out warning areas for a preset disaster to occur within a preset future time period. The location determination device will then receive the warning areas periodically sent by the disaster early warning server. These warning areas may contain multiple geographical location information.
[0118] This embodiment provides a method for determining location relationship types. When acquiring a warning area for a preset disaster occurring within a preset future time period, the method specifically includes: receiving warning areas for a preset disaster occurring within a preset future time period, periodically sent by a disaster warning server. Each warning area contains geographical location information of the area where the preset disaster will occur within the preset future time period. In this embodiment, the warning areas are received from an official disaster warning server, ensuring a certain level of accuracy. Since the warning areas may change according to actual circumstances, the determining device can periodically receive warning areas, thereby enabling the location determining device to acquire warning areas that more accurately reflect the actual situation.
[0119] Example 3
[0120] Figure 3This is a flowchart illustrating a method for determining location relationship types according to Embodiment 3 of this application. This embodiment is a further refinement of any of the above embodiments, and it is a feasible way to determine target users located in a warning area within a first preset time period, such as... Figure 3 As shown, the specific content is as follows.
[0121] S301, determine the candidate users communicating through terminal devices within the largest area of the warning area; there are multiple candidate users.
[0122] The maximum range area refers to the largest geographical location among the geographical location information in the warning area. For example, if the geographical location is a certain province, a certain city, and a certain district, the maximum range area is the province.
[0123] Among them, terminal equipment communication refers to terminal equipment with communication functions.
[0124] Specifically, the location determination device will read the geographical location information in the warning area, and then determine the maximum range area. Based on the maximum range area, it will determine the candidate mobile phone numbers in that area, and then use the terminal devices corresponding to the candidate mobile phone numbers as candidate terminal devices. In this way, it will determine the candidate users who communicate through the terminal devices in the maximum range area. The user corresponding to the terminal device is the candidate user.
[0125] For example, if the maximum area included in the warning zone is Province A, the location determination device will determine candidate mobile phone numbers, which include (1) mobile phone numbers whose home location is in Province A, and (2) mobile phone numbers whose home location is not in Province A but whose home location is in Province A for a long time. Then, the terminal device corresponding to the candidate mobile phone number is used as a candidate terminal device, and the user corresponding to the candidate terminal device is used as a candidate user. Here, the mobile phone number and the home location are corresponding, and one home location can have multiple mobile phone numbers.
[0126] S302, Obtain the regional data sent by the terminal device corresponding to each candidate user within the first preset time period.
[0127] The regional data sent within the first preset time period can be stored in the storage area of the terminal device.
[0128] Specifically, the location determination device will retrieve the regional data sent within a first preset time period from the storage area of the terminal device corresponding to the candidate user.
[0129] It is understandable that if the first preset time period is very short, such as regional data within one minute, then the geographical location information corresponding to that one minute can be used as regional data.
[0130] In one approach, if the first preset time period is 5 minutes or slightly longer, the center point of the latitude and longitude can be calculated by aggregating the latitude and longitude values contained in the regional data within these 5 minutes, and the geographical location information corresponding to the center point of the latitude and longitude can be used as the regional data. The regional data may include the latitude and longitude corresponding to the geographical location information. The location determination device may contain the geographical location information and its corresponding latitude and longitude, and thus the geographical location information can be determined based on the center point of the latitude and longitude.
[0131] In one approach, this method is an optional way to obtain the regional data sent by the corresponding terminal devices of each candidate user within a first preset time period, the details of which are as follows.
[0132] Obtain signaling data sent by the terminal devices corresponding to each candidate user within a first preset time period; the signaling data includes regional data.
[0133] Signaling data refers to any data generated using a terminal device, including data generated from browsing web pages or opening any application. Signaling data can be stored in the storage area of the candidate user's corresponding device, and it includes area data.
[0134] Specifically, the location determination device retrieves the signaling data sent within a first preset time period from the storage area of the terminal device corresponding to the candidate user.
[0135] Extract regional data from the signaling data sent within the first preset time period.
[0136] It should be noted that as long as the candidate user's corresponding terminal device is in use, the candidate user's corresponding terminal device can generate signaling data and store the signaling data in its own storage area. Even when the candidate user's corresponding terminal device is in a static state, it can still generate and store signaling data. The static state refers to the terminal device being powered on but not in use.
[0137] It is understandable that if the terminal device corresponding to a candidate user is damaged, the damaged terminal device will not generate signaling data.
[0138] This method, when acquiring regional data sent by the terminal devices corresponding to each candidate user within a first preset time period, specifically includes: acquiring signaling data sent by the terminal devices corresponding to each candidate user within the first preset time period; the signaling data containing regional data; and extracting regional data from the signaling data sent within the first preset time period. In this embodiment, the location determination device first acquires the signaling data sent by the terminal devices corresponding to the candidate users within the first preset time period. Since the signaling data contains regional data, the location determination device can extract the regional data within the first preset time period from the signaling data. Because the first preset time period is closest to the current time, the obtained regional data is more consistent with the current needs and actual situation.
[0139] S303, based on the regional data within the first preset time period and the warning area, determine the target users corresponding to each terminal device located in the warning area within the first preset time period.
[0140] Specifically, the location determination device will use regional data within a first preset time period and candidate terminal devices located within the warning area within the first preset time period to identify the user corresponding to the candidate terminal device at that time as the target user.
[0141] This embodiment provides a method for determining location relationship types. When determining target users located in a warning area within a first preset time period, the method specifically includes: determining candidate users communicating through terminal devices within the maximum range of the warning area; there are multiple candidate users; acquiring regional data sent by the terminal devices corresponding to each candidate user within the first preset time period; and determining the target users corresponding to each terminal device located in the warning area within the first preset time period based on the regional data within the first preset time period and the warning area. The location determination device in this embodiment first determines candidate users communicating through terminal devices within the maximum range of the warning area based on the maximum range of the warning area. Since the maximum range is the largest indicator, candidate users can be accurately obtained. Furthermore, it acquires the regional data sent by the terminal devices corresponding to the candidate users within the first preset time period. Since the acquired regional data is from the first preset time period, it reflects the geographical location information of the most recent period before the current time. Therefore, based on the aforementioned regional data and the warning area, the target users corresponding to each terminal device located in the warning area within the first preset time period can be determined, resulting in more accurate target user determination.
[0142] Example 4
[0143] Figure 4This is a flowchart illustrating a method for determining location relationship types according to Embodiment 4 of this application. This embodiment is a further refinement of any of the above embodiments. This embodiment is a feasible way to determine the target users corresponding to each terminal device located in the warning area within the first preset time period based on regional data and the warning area within the first preset time period. Figure 4 As shown, the specific steps are as follows.
[0144] S401, obtain the area code table, and determine the area data and the area code corresponding to the warning area within the first preset time period based on the area code table.
[0145] The area code table consists of preset areas and their corresponding area codes, where each area code is a unique identifier for the geographic location information within a preset area. The area code table can be stored in the storage area of the location determining device, and it can contain multiple preset areas and their corresponding area codes.
[0146] Table 1 is a regional code table provided in this embodiment four. As shown in Table 1, the preset region is A province A city A, and its corresponding regional code is ABCD; the preset region is A province A city A district, and its corresponding regional code is ABCD-1; the preset region is A province A city B district, and its corresponding regional code is ABCD-2; the preset region is A province A city A district A street, and its corresponding regional code is ABCD-1-1.
[0147] It is understandable that the preset regions, whether large or small, have corresponding region codes.
[0148] Table 1: Regional Code Table.
[0149]
[0150] In Table 1, City A of Province A includes District A of City A of Province A and District B of City A of Province A. District A of City A of Province A includes Subdistrict A of District A of City A of Province A.
[0151] Specifically, the location determination device matches the geographical location information in the regional data within a first preset time period with the geographical locations in multiple preset regions in the region code table. If the geographical location information of any preset region matches the regional data within the first preset time period, then the region code corresponding to that preset region is used as the region code for the regional data within the first preset time period. The same method is used to determine the region code corresponding to the warning region.
[0152] For example, if the geographical location information in the regional data of the first preset time period is Province A, City A, District B, then its corresponding area code is ABCD-2. If the geographical location information in the warning area is Province A, City A, then its corresponding area code is ABCD.
[0153] S402, the area code corresponding to the area data within the first preset time period is determined as the target area code, and the area code corresponding to the warning area is determined as the warning area code.
[0154] For example, the area code ABCD-2 corresponding to the area data of the first preset time period in S401 is determined as the target area code, and the area code ABCD corresponding to the warning area is used as the warning area code.
[0155] S403, match the target area code with the warning area code.
[0156] For example, the target area code (ABCD-2) and the warning area code (ABCD) in S402 above are matched.
[0157] S404, if it is determined that the warning area code includes the target area code, then the candidate user of the terminal device corresponding to the target area code is located in the warning area within the first preset time period, and the candidate user is identified as the target user.
[0158] For example, in the above S402, the warning area code (ABCD) includes the target area code (ABCD-2), thereby determining that the candidate user of the terminal device corresponding to the target area code is located in the warning area within the first preset time period, and then determining the candidate user as the target user.
[0159] S405, if it is determined that the warning area code does not include the target area code, then it is determined that the candidate user of the terminal device corresponding to the target area code is not located in the warning area within the first preset time period, and the candidate user is determined as a non-target user.
[0160] For example, if the warning area code is ABCD-1 and the target area code is ABCD-2, then it is determined that the candidate user of the terminal device corresponding to the target area code is not in the warning area within the first preset time period, and thus the candidate user is determined to be a non-target user.
[0161] This embodiment provides a method for determining location relationship types. When determining target users corresponding to terminal devices located in the warning area within the first preset time period based on regional data and warning areas within the first preset time period, the method specifically includes: obtaining a regional code table, and determining the regional data within the first preset time period and the regional code corresponding to the warning area based on the regional code table; determining the regional code corresponding to the regional data within the first preset time period as the target regional code, and determining the regional code corresponding to the warning area as the warning area code; matching the target regional code with the warning area code; if the warning area code includes the target regional code, then determining that the candidate user of the terminal device corresponding to the target regional code is located in the warning area within the first preset time period, and determining the candidate user as the target user; if the warning area code does not include the target regional code, then determining that the candidate user of the terminal device corresponding to the target regional code is not located in the warning area within the first preset time period, and determining the candidate user as a non-target user. In this embodiment, the location determination device first acquires a region code table. Based on the region code table, it determines the region code corresponding to the region data within a first preset time period as the target region code and the region code corresponding to the warning region as the warning region code. Since the region code table contains multiple region codes, it can accurately obtain the region data within the first preset time period and the region code corresponding to the warning region. Thus, the location determination device determines the candidate users of terminal devices located in the warning region within the first preset time period as target users based on the target region code and the warning region code. Candidate users of terminal devices not located in the warning region within the first preset time period are not target users. This embodiment can accurately determine the target user based on the comparison between the target region code and the warning region code.
[0162] Example 5
[0163] This application embodiment is a further refinement of any of the above embodiments. This embodiment is a feasible way to determine the current region where the target user is located at the current time, and the specific content is as follows.
[0164] Obtain the current time and region data of the target user's corresponding terminal device;
[0165] The current time area data is generated in real time and can be directly sent to the location determination device by the target user's corresponding terminal device.
[0166] In one approach, this method is an optional way to obtain the current time and regional data of the target user's corresponding terminal device, as detailed below.
[0167] Obtain the signaling data of the target user's corresponding terminal device at the current time.
[0168] Specifically, the location determination device will obtain the current time signaling data from the target user's corresponding terminal device. This signaling data includes regional data.
[0169] Extract the regional data from the signaling data at the current time as the regional data for the target user's corresponding terminal device at the current time.
[0170] Specifically, the location determination device extracts regional data from the signaling data at the current time. The regional data contains geographical location information, which the location determination device then uses as the regional data of the target user's corresponding terminal device at the current time.
[0171] This method, when obtaining the current time region data of the target user's corresponding terminal device, specifically includes: obtaining the signaling data of the target user's corresponding terminal device at the current time; and extracting region data from the current time signaling data as the region data of the target user's corresponding terminal device at the current time. This method first obtains the signaling data of the target user's corresponding terminal device at the current time. Since the signaling data contains region data, the location determining device extracts the region data of the current time from the current time signaling data and uses this current time region data as the region data of the target user's corresponding terminal device at the current time. Because the current time signaling data originates from the target user's corresponding terminal device, the location determining device can accurately use it as the region data of the target user's corresponding device at the current time.
[0172] The current time region data is used to determine the current region of the corresponding target user.
[0173] Specifically, the location determination device will read the current area data, and then determine the area data at the current time as the current area of the target user using the terminal device.
[0174] This embodiment provides a method for determining location relationship types. Specifically, when determining the current region where a target user is located at the current time, the method includes: acquiring the current time region data of the target user's corresponding terminal device; and determining the current time region data as the corresponding target user's current region. In this embodiment, the location determination device first acquires the current time region data of the target user's corresponding terminal device. Since the current time region data of the terminal device reflects the region where the terminal device is located at the current time, and thus reflects the region where the target user using the terminal device is located, the current time region data of the terminal device is determined as the current region of its corresponding target user.
[0175] Example 6
[0176] Figure 5This is a flowchart illustrating a method for determining a location relationship type according to Embodiment Six of this application. This embodiment is a further refinement of any of the above embodiments, and it provides a feasible method for determining the historical region located within each sampling time period in a second preset time period, such as... Figure 5 As shown, the specific steps are as follows.
[0177] S501, acquire historical area data of each sampling point within the second preset time period of the target user's corresponding terminal device.
[0178] Here, a sampling point refers to each point in time, which can be one sampling point per minute. Each sampling point corresponds to a historical region of data.
[0179] It should be noted that the sampling points and their corresponding historical area data can be arranged sequentially from front to back in chronological order.
[0180] The second preset time period refers to a period of time that has already occurred. This second preset time period includes multiple sampling points, and the historical data corresponding to these sampling points is stored in the storage area of the terminal device.
[0181] Specifically, the location determination device will retrieve historical area data for each sampling point within a second preset time period from the storage area of the terminal device.
[0182] S502 divides the historical area data of each sampling point according to the sampling time period to obtain historical area data within multiple sampling time periods.
[0183] The sampling time period is shorter than the second preset time period, and the sampling time period may include multiple sampling points.
[0184] Specifically, the location determination device will divide the sampling time period into multiple batches for each sampling point within the second preset time period. Each batch is a sampling time period, and the historical area data corresponding to multiple sampling points within that sampling time period will form the historical area data within that sampling time period.
[0185] Table 2 presents historical data within multiple sampling time periods provided in Embodiment Six. As shown in Table 2, the second preset time period is one hour. One sampling point corresponds to one sampling time, where each minute represents one sampling point. Each sampling point corresponds to one historical region data. Five sampling points are considered as one sampling time period. Table 2 shows time period 1 and time period 2; other sampling time periods are omitted. Sampling time period 1 includes sampling points 1 to 5, therefore the historical region data for sampling time period 1 includes the historical region data corresponding to sampling points 1 to 5. Sampling time period 2 includes sampling points 6 to 10, therefore the historical region data for sampling time period 2 includes the historical region data corresponding to sampling points 6 to 10. Table 2: Historical Data Within Multiple Sampling Time Periods
[0186]
[0187] It should be noted that historical regional data may also include the latitude and longitude corresponding to geographical location information.
[0188] S503 clusters historical region data from multiple sampling points within each sampling time period to determine the historical region within each sampling time period.
[0189] Specifically, the historical area data contains the latitude and longitude corresponding to the geographical location information. The location determination device will cluster the latitude and longitude of the historical area data of multiple sampling points within each sampling time period to determine the historical area within each sampling time period.
[0190] S504, the historical area corresponding to the terminal device in each sampling time period within the second preset time period is determined as the historical area where the corresponding target user is located in each sampling time period within the second preset time period.
[0191] Specifically, since the terminal device and the target user are in a corresponding relationship, and the terminal device moves with the target user, the location determination device determines the historical area corresponding to the terminal device in each sampling time period as the historical area where the target user is located in each sampling time period in the second preset time period.
[0192] It should be noted that there can be multiple historical regions within the second preset time period.
[0193] This embodiment provides a method for determining the location relationship type. Specifically, when determining the historical region located within each sampling time period of a second preset time period, the method includes: acquiring historical region data for each sampling point of the target user's corresponding terminal device within the second preset time period; dividing the historical region data of each sampling point according to the sampling time period to obtain historical region data within multiple sampling time periods; clustering the historical region data of multiple sampling points within each sampling time period to determine the historical region within each sampling time period; and determining the historical region corresponding to the terminal device within each sampling time period of the second preset time period as the historical region where the corresponding target user is located within each sampling time period of the second preset time period. In this embodiment, the location determination device first acquires historical region data for each sampling point within a second preset time period of the target user's corresponding terminal device. Then, it divides the historical region data for each sampling point according to the sampling time period, thereby obtaining historical region data for multiple sampling time periods. To accurately obtain the historical region within the sampling time period, the location determination device clusters the historical region data of multiple sampling points within each sampling time period, thus obtaining a specific historical region. Since the target user can actually move within the sampling time period, the historical region data of multiple sampling points within that sampling time period will have slight changes. After clustering the historical region data of multiple sampling points, a historical region can be obtained. This historical region serves as the geographical location within that sampling time period and is thus determined as the historical region within the sampling time period. Because there is a correspondence between the terminal device and the target user, the location determination device determines the historical region within each sampling time period of the second preset time period corresponding to the terminal device as the historical region where the target user is located within each sampling time period of the second preset time period, thereby accurately obtaining each historical region of the target user.
[0194] Example 7
[0195] Figure 6 This is a flowchart illustrating a method for determining the location relationship type according to Embodiment Seven of this application. This embodiment is a further refinement of any of the above embodiments. This embodiment is a feasible way to determine the location relationship type between a target user and a warning area based on the current area, historical areas, and warning areas. Figure 6 As shown, the specific steps are as follows.
[0196] S601, based on the regional code table, determine the current regional code corresponding to the current region and the historical regional codes corresponding to each historical region.
[0197] The specific implementation method is the same as that of S401, and you can refer to the description of S401. It will not be repeated here.
[0198] S602 matches the current area code with the warning area code.
[0199] S603, in response to the warning area code not including the current area code, the location relationship type between the target user and the warning area is determined to be "has left the warning area".
[0200] For the specific implementation method, please refer to Implementation Example 4, which will not be repeated here.
[0201] Specifically, if the warning area code does not include the current area code, since the target user was determined to be within the warning area within the first preset time period, but the current target user is no longer within the warning area, the location determination device will determine the location relationship between the target user and the warning area as "left the warning area".
[0202] S604, in response to the warning area code including the current area code, matches each historical area code with the warning area code to determine the location relationship type between the target user and the warning area.
[0203] Specifically, the location determination device identifies the warning area code, including the current area code, and then matches each historical area code with the warning area code to determine the type of location relationship between the target user and the warning area.
[0204] This embodiment provides a method for determining the location relationship type. When determining the location relationship type between a target user and a warning area based on the current area, historical areas, and warning areas, the method specifically includes: determining the current area code corresponding to the current area and the historical area codes corresponding to each historical area based on an area code table; matching the current area code with the warning area code; if the warning area code does not include the current area code, then the location relationship type between the target user and the warning area is determined to be "left the warning area"; if the warning area code includes the current area code, then the historical area codes are matched with the warning area code to determine the location relationship type between the target user and the warning area. The location determination device in this embodiment first determines the area code corresponding to the current area of the user's departure and the historical area codes corresponding to each historical area based on the area code. Then, it matches the current area code with the warning area code. If the match fails, it means the target user's current area is not in the warning area, thus determining that the target user has left the warning area; if the match succeeds, it means the target user's current area is still in the warning area, and then the location relationship type is determined. Based on whether the area codes match, the location relationship type can be accurately determined.
[0205] In one approach, historical region codes are ordered chronologically. This approach involves matching each historical region code with a warning region code to determine the locational relationship between the target user and the warning region.
[0206] If a set of consecutive historical area codes from the last set of historical area codes matches a warning area code, and the set of consecutive historical area codes matches a set of warning area codes, and the set of consecutive historical area codes matches a set of warning area codes, then the location relationship between the target user and the warning area is determined to be that the user is residing in the warning area.
[0207] The first preset number threshold is the critical minimum value for the number of users residing in the warning area. If the first preset number is greater than the first preset number threshold, it means that the target user has been residing in the warning area for a long time.
[0208] Specifically, the location determination device will match the last set of a first preset number of consecutive historical area codes from each historical area code within each adopted time period within the second preset time period with the warning area code. If the first preset number is greater than a first preset threshold, the location determination device will determine the location relationship between the target user and the warning area as residing in the warning area.
[0209] For example, the historical area codes (assuming 24 area codes) can be sorted in chronological order. The location determination device determines the first preset number (assuming 20) of consecutive historical area codes from the end to the front after sorting and matches them with the warning area codes. Then, the first preset number is compared with the first preset number threshold (assuming 18). It is determined that the first preset number (20) is greater than the first preset number threshold (18), thereby determining that the location relationship type of the target user is residing in the warning area.
[0210] In response to the matching of the second preset number of consecutive historical area codes with the warning area code in each historical area code, and the second preset number is less than the second preset number threshold, the location relationship type between the target user and the warning area is determined to be "passing through the warning area"; the first preset number threshold is greater than the second preset number threshold.
[0211] The second preset number threshold is the critical maximum value for passing through the warning area. If the second preset number is less than the second preset number threshold, it means that the target user is only passing through the warning area.
[0212] For example, the historical area codes (assuming 24 area codes) can be sorted in chronological order. The location determination device determines the second preset number (assuming 4) of consecutive historical area codes from the end to the front after sorting and matches them with the warning area codes. Then, the second preset number is compared with the second preset number threshold (assuming 5), and it is determined that the first preset number (4) is less than the first preset number threshold (5), thereby determining that the location relationship type of the target user is that the path is in the warning area.
[0213] It should be noted that for target users corresponding to consecutive historical area codes between the first preset threshold and the second preset number threshold, they can be identified as residing in the warning area or passing through the warning area depending on the time.
[0214] In one approach, the location trajectories of historical areas within a second preset time period can be determined chronologically. These trajectories are contained within a map topology, which includes the map topology of the warning area and the corresponding map topologies of each historical area. By analyzing the location trajectories and map topology, it can be determined whether the location is within the map topology of the warning area, thereby identifying the target user's location relationship type.
[0215] It should be noted that other methods can be used to determine the positional relationship type in this application, and no restrictions are imposed here.
[0216] In this method, historical area codes are sorted in chronological order. When matching each historical area code with the warning area code to determine the location relationship type between the target user and the warning area, the specific steps include: if a first preset number of consecutive historical area codes matches the warning area code and the first preset number is greater than a first preset number threshold, then the location relationship type between the target user and the warning area is determined to be residing in the warning area; if a second preset number of consecutive historical area codes matches the warning area code and the second preset number is less than a second preset number threshold, then the location relationship type between the target user and the warning area is determined to be passing through the warning area; the first preset number threshold is greater than the second preset number threshold. In this embodiment, the location determination device responds to the matching of a first preset number of consecutive historical area codes with the warning area code in each historical area code. Since the set first preset number threshold is a criterion for judging whether the user resides in the warning area, when the first preset number is greater than the first preset number threshold, the location relationship type between the target user and the warning area is accurately determined to be residing in the warning area. At the same time, the location determination device responds to the matching of a second preset number of consecutive historical area codes with the warning area code in each historical area code, and sets the second preset number threshold as a criterion for judging whether the user passes through the warning area. When the second preset number is greater than the second preset number threshold, the location relationship type between the target user and the warning area can be accurately determined to be passing through the warning area.
[0217] Example 8
[0218] Figure 7 This is a flowchart illustrating a method for determining location relationship types according to Embodiment 8 of this application. This embodiment is a further refinement of any of the above embodiments. This embodiment provides a feasible way to determine whether to issue a disaster warning to a target user based on the location relationship type, such as... Figure 7 As shown, the specific steps are as follows.
[0219] S701, in response to the location relationship type being "residing in the warning area", determines to issue a disaster warning to the target user using the first warning strategy.
[0220] The first early warning strategy could be to make a phone call or send a text message to the target user's terminal device at regular intervals. The interval can be set according to actual needs; if the disaster is particularly dangerous, urgent, and explosive, it can be set to send the message every minute. There is no limit to this.
[0221] Specifically, the location determination device identifies the target user as residing in the warning area, then determines the target user's mobile phone number, and then executes the first warning strategy on the mobile phone number to achieve disaster warning for the target user corresponding to the mobile phone number.
[0222] S702, in response to the location relationship type being "passing through warning area", determines to issue a disaster warning to the target user using the second warning strategy.
[0223] The second early warning strategy could be to send a text message once or at regular intervals to the target user's terminal device.
[0224] S8703, in response to the location relationship type being "left the warning area", determines that no disaster warning will be issued for the target user.
[0225] It should be noted that if the target user has left the warning area, a disaster warning may not be issued to that target user.
[0226] This embodiment provides a method for determining location relationship types. When determining whether to issue a disaster warning to a target user based on the location relationship type, the method specifically includes: responding to a location relationship type of "residing in a warning area," determining to issue a disaster warning to the target user using a first warning strategy; responding to a location relationship type of "passing through a warning area," determining to issue a disaster warning to the target user using a second warning strategy; and responding to a location relationship type of "leaving the warning area," determining not to issue a disaster warning to the target user. In this embodiment, the location determination device responds to a location relationship type of "residing in a warning area" and determines to issue a disaster warning to the target user using the first warning strategy. Similarly, if the location relationship type is "passing through a warning area," a disaster warning is issued to the target user using the second warning strategy. For target users who have left the warning area, to avoid causing annoyance or inconvenience, no disaster warning is issued. This embodiment uses different warning strategies for different location relationship types, thus enabling targeted disaster warnings. Warnings are issued to target users who truly need them, and different warning strategies can be configured according to the importance of the location relationship type, thereby improving the user experience.
[0227] Example 9
[0228] The following are embodiments of the apparatus described in this application. Figure 8 This is a schematic diagram of a positional relationship type determination device provided in Embodiment 9 of this application. Figure 8 As shown, the device 800 includes the following modules.
[0229] The acquisition module 801 is used to acquire the warning area where a preset disaster will occur within a preset future time period.
[0230] The first determining module 802 is used to determine the target users located in the warning area within the first preset time period.
[0231] The second determining module 803 is used to determine the current region where the target user is located at the current time and the historical region where the target user is located in each sampling time period within the second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period.
[0232] The third determining module 804 is used to determine the location relationship type between the target user and the warning area based on the current area, each historical area and the warning area; the location relationship type includes at least one of the following: having left the warning area, residing in the warning area, and passing through the warning area.
[0233] The fourth determination module 805 is used to determine whether to issue a disaster warning to the target user based on the location relationship type.
[0234] In one approach, the acquisition module 801, when acquiring a warning area where a preset disaster is expected to occur within a preset future time period, is specifically used for:
[0235] It receives warning areas for a preset disaster to occur within a preset future time period, which are periodically sent by the disaster warning server. The warning areas include the geographical location information of the areas where the preset disaster will occur within the preset future time period.
[0236] In one embodiment, the first determining module 802, upon determining a target user located within the warning area during a first preset time period, is specifically configured to:
[0237] Based on the largest area in the warning zone, candidate users communicating through terminal devices within the largest area are identified; there are multiple candidate users; regional data sent by the terminal devices corresponding to each candidate user within a first preset time period is obtained; based on the regional data within the first preset time period and the warning zone, the target users corresponding to each terminal device located in the warning zone within the first preset time period are identified.
[0238] In one embodiment, the first determining module 802, when determining the target users corresponding to each terminal device located in the warning area within the first preset time period based on regional data and the warning area, is specifically used for:
[0239] Obtain the area code table, and determine the area data and the area code corresponding to the warning area within the first preset time period based on the area code table; determine the area code corresponding to the area data within the first preset time period as the target area code, and determine the area code corresponding to the warning area as the warning area code; match the target area code with the warning area code; if the warning area code includes the target area code, determine that the candidate user of the terminal device corresponding to the target area code is located in the warning area within the first preset time period, and determine the candidate user as the target user; if the warning area code does not include the target area code, determine that the candidate user of the terminal device corresponding to the target area code is not located in the warning area within the first preset time period, and determine the candidate user as a non-target user.
[0240] In one embodiment, the first determining module 802, when acquiring the regional data sent by the terminal devices corresponding to each candidate user within a first preset time period, is specifically used for:
[0241] Obtain signaling data sent by the terminal devices corresponding to each candidate user within a first preset time period; the signaling data contains regional data; extract the regional data from the signaling data sent within the first preset time period.
[0242] In one approach, the second determining module 803, when determining the current region where the target user is located at the current time, is specifically used for:
[0243] Obtain the current time and region data of the target user's corresponding terminal device; determine the current time and region data as the current region of the target user.
[0244] In one embodiment, the second determining module 803, when acquiring the current time region data of the target user's corresponding terminal device, is specifically used for:
[0245] Obtain the signaling data of the target user's corresponding device at the current time; extract the regional data from the signaling data at the current time as the regional data of the target user's corresponding terminal device at the current time.
[0246] In one embodiment, the second determining module 803, when determining the historical region located within each sampling time period of the second preset time period, is specifically used for:
[0247] The historical region data of each sampling point within a second preset time period of the target user's terminal device is obtained; the historical region data of each sampling point is divided according to the sampling time period to obtain historical region data within multiple sampling time periods; the historical region data of multiple sampling points within each sampling time period are clustered to determine the historical region within each sampling time period; the historical region of the terminal device within each sampling time period within the second preset time period is determined as the historical region where the corresponding target user is located within each sampling time period within the second preset time period.
[0248] In one approach, the third determining module 804, when determining the location relationship type between the target user and the warning area based on the current area, historical areas, and warning areas, is specifically used for:
[0249] Based on the regional code table, determine the current regional code corresponding to the current region and the historical regional codes corresponding to each historical region; match the current regional code with the warning regional code; if the warning regional code does not include the current regional code, determine the location relationship type between the target user and the warning region as "has left the warning region"; if the warning regional code includes the current regional code, match each historical regional code with the warning regional code to determine the location relationship type between the target user and the warning region.
[0250] In one approach, the historical zone codes are sorted chronologically; the third determining module 904, when matching the historical zone codes with the warning zone codes to determine the locational relationship type between the target user and the warning zone, is specifically used for:
[0251] If a set of consecutive historical area codes from the last set of historical area codes matches a warning area code, and the first set of historical area codes is greater than a first set of historical area codes threshold, then the location relationship between the target user and the warning area is determined to be "residing in the warning area". If a set of consecutive historical area codes from the last set of historical area codes matches a warning area code, and the second set of historical area codes is less than a second set of historical area codes threshold, then the location relationship between the target user and the warning area is determined to be "passing through the warning area". The first set of historical area codes threshold is greater than the second set of historical area codes threshold.
[0252] In one approach, the fourth determining module 805, when determining whether to issue a disaster warning to the target user based on the location relationship type, is specifically used for:
[0253] If the location relationship type is "residing in the warning area", a disaster warning is issued to the target user using the first warning strategy; if the location relationship type is "passing through the warning area", a disaster warning is issued to the target user using the second warning strategy; if the location relationship type is "left the warning area", no disaster warning is issued to the target user.
[0254] Example 10
[0255] Figure 9 This is a schematic diagram of the structure of an electronic device provided in Embodiment 10 of this application. Figure 9 As shown, the electronic device 900 may include a processor 901 and a memory 902 communicatively connected to the processor 901. The memory 902 stores computer-executable instructions; the processor 901 executes the computer-executable instructions stored in the memory 902 to implement any one of the method embodiments 1 to 8 described above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0256] In this embodiment, the memory 902 and the processor 901 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0257] Example 11
[0258] This application provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement any one of the method embodiments 1 to 8 described above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0259] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0260] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for determining the type of positional relationship, the method comprising: Obtain the warning area where a preset disaster is expected to occur within a preset future time period; Identify target users located in the warning area within the first preset time period; Determine the current region where the target user is located at the current time and the historical region where the target user is located in each sampling time period within the second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period closest to the current time. The location relationship type between the target user and the warning area is determined based on the current area, each of the historical areas, and the warning area. The location relationship types include at least one of the following: having left the warning area, remaining in the warning area, and passing through the warning area; Whether to issue a disaster warning to the target user is determined based on the location relationship type.
2. The method according to claim 1, characterized in that, The acquisition of the early warning area for a predetermined disaster to occur within a predetermined future time period includes: The system receives periodic warnings from a disaster warning server regarding the areas where a predetermined disaster will occur within a predetermined future time period. These warning areas include the geographical location information of the areas where the predetermined disaster will occur within the predetermined future time period.
3. The method according to claim 1 or 2, characterized in that, The determination of target users located in the warning area within the first preset time period includes: Candidate users communicating via terminal devices within the maximum range of the warning area are determined based on the maximum range of the warning area, where the maximum range is the largest geographical location among the geographical location information in the warning area; there are multiple candidate users. Obtain the regional data sent by the terminal devices corresponding to each candidate user within a first preset time period; Based on the regional data within the first preset time period and the warning area, the target users corresponding to each terminal device located in the warning area within the first preset time period are determined.
4. The method according to claim 3, characterized in that, The step of determining the target users corresponding to each terminal device located in the warning area within the first preset time period based on regional data within the first preset time period and the warning area includes: Obtain the area code table, and determine the area data within the first preset time period and the area code corresponding to the warning area based on the area code table; The area code corresponding to the area data within the first preset time period is determined as the target area code, and the area code corresponding to the warning area is determined as the warning area code. Match the target area code with the warning area code; If it is determined that the warning area code includes the target area code, then it is determined that the candidate user of the terminal device corresponding to the target area code is located in the warning area during the first preset time period, and the candidate user is determined as the target user. If it is determined that the warning area code does not include the target area code, then it is determined that the candidate user of the terminal device corresponding to the target area code is not located in the warning area during the first preset time period, and the candidate user is determined as a non-target user.
5. The method according to claim 3, characterized in that, The step of obtaining the regional data sent by the terminal devices corresponding to each candidate user within a first preset time period includes: Obtain signaling data sent by the terminal devices corresponding to each candidate user within a first preset time period; the signaling data includes regional data; Extract regional data from the signaling data sent within the first preset time period.
6. The method according to claim 1, characterized in that, Determining the current region where the target user is located at the current time includes: Obtain the current time and region data of the target user's corresponding terminal device; The current time region data is determined as the current region of the corresponding target user.
7. The method according to claim 6, characterized in that, The step of obtaining the current time region data of the target user's corresponding terminal device includes: Obtain the signaling data of the current time of the terminal device corresponding to the target user; Regional data is extracted from the signaling data at the current time and used as the regional data for the target user's corresponding terminal device at the current time.
8. The method according to claim 1, characterized in that, Determining the historical region within each sampling time period of the second preset time period includes: Acquire historical area data for each sampling point within a second preset time period for the target user's corresponding terminal device; The historical area data of each sampling point is divided according to the sampling time period to obtain historical area data within multiple sampling time periods. Cluster the historical region data of multiple sampling points within each sampling time period to determine the historical region within each sampling time period; The historical region corresponding to the terminal device within each sampling time period in the second preset time period is determined as the historical region where the corresponding target user is located within each sampling time period in the second preset time period.
9. The method according to any one of claims 1, 2, 6-8, characterized in that, The step of determining the location relationship type between the target user and the warning area based on the current area, each of the historical areas, and the warning area includes: Based on the regional code table, determine the current regional code corresponding to the current region and the historical regional codes corresponding to each historical region. Match the current region code with the warning region code; If the warning area code does not include the current area code, then the location relationship type between the target user and the warning area is determined to be "has left the warning area"; In response to the warning area code including the current area code, each historical area code is matched with the warning area code to determine the location relationship type between the target user and the warning area.
10. The method according to claim 9, characterized in that, The historical region codes are ordered chronologically; matching each historical region code with the warning region code to determine the location relationship type between the target user and the warning region includes: If a first preset number of consecutive historical region codes in each historical region code match the warning region code, and the first preset number is greater than the first preset number threshold, then the location relationship type between the target user and the warning region is determined to be residing in the warning region. In response to a second preset number of consecutive historical area codes matching the warning area code in each historical area code, and the second preset number being less than a second preset number threshold, the location relationship type between the target user and the warning area is determined to be "passing through the warning area"; the first preset number threshold is greater than the second preset number threshold.
11. The method according to any one of claims 1, 2, 6-8, characterized in that, The step of determining whether to issue a disaster warning to the target user based on the location relationship type includes: In response to the location relationship type indicating that the user is residing in the warning area, a disaster warning is issued to the target user using the first warning strategy. In response to the location relationship type being "passing through the warning area", a disaster warning is issued to the target user using the second warning strategy. In response to the location relationship type being "left the warning area", it is determined that no disaster warning will be issued for this target user.
12. A device for determining the type of positional relationship, characterized in that, The device includes: The acquisition module is used to acquire the warning area where a preset disaster will occur within a preset future time period; The first determining module is used to determine the target users located in the warning area within the first preset time period; The second determining module is used to determine the current region where the target user is located at the current time and the historical region where the target user is located in each sampling time period within the second preset time period; the second preset time period is the most recent time period before the current time, and the second preset time period includes the first preset time period closest to the current time. The third determining module is used to determine the location relationship type between the target user and the warning area based on the current area, each of the historical areas and the warning area; the location relationship type includes at least one of: having left the warning area, residing in the warning area, and passing through the warning area. The fourth determining module is used to determine whether to issue a disaster warning to the target user based on the location relationship type.
13. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.
Citation Information
Patent Citations
Predictive notification system for emergency services
CN102265577A
Risk early warning method and related device
CN111260215A