Client-based weather early warning method, device and equipment and medium
By obtaining browser start commands and preset time mechanisms on the personal computer to request weather data and generate weather warning information, the problem of low generation efficiency of weather warning information in the existing technology is solved, and the efficiency of automatic weather warning and information generation is improved.
Patent Information
- Application Number
- CN202411868490.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the generation efficiency of weather warning information on the personal computer is low, and automatic weather warning cannot be achieved.
By obtaining the startup instructions of the target browser in the target client, data requests are made to the target application programming interface based on the preset time mechanism, the current set of weather information is determined, and the process is formatted to generate weather warning information.
It realizes automatic weather warning on the personal computer without manual operation, improving the efficiency of weather warning information generation.
Smart Images

Figure CN119806675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a client-based weather warning method, device, equipment and medium. Background Art
[0002] With the rapid development of artificial intelligence technology, weather forecasts have brought convenience to people's lives and work. For example, employees can arrange business trips and commutes based on weather forecast results. Users can also decide whether to use public transportation based on weather forecast results.
[0003] In the prior art, desktop weather software, weather websites, and weather browser plug-ins are usually used to implement weather forecasts on personal computers. However, if desktop weather software is used to forecast weather, users need to download and install weather desktop applications to obtain weather forecast results. If weather websites or weather browser plug-ins are used to forecast weather, users need to manually access the weather website after opening the browser to view weather information, and weather websites cannot provide warning information.
[0004] Therefore, how to realize automatic weather warning on personal computers and improve the efficiency of generating weather warning information is a problem that needs to be solved urgently. Summary of the invention
[0005] The present invention provides a client-based weather warning method, device, equipment and medium, which can solve the problem of low efficiency in generating weather warning information on the client.
[0006] According to one aspect of the present invention, a client-based weather warning method is provided, comprising:
[0007] Get the startup instruction corresponding to the target browser in the target client;
[0008] Performing a data request to a target application programming interface based on the startup instruction and a preset time mechanism to determine a current weather information set corresponding to the startup instruction;
[0009] The current weather information set is formatted to obtain a target weather information group corresponding to the current weather information set, and the target weather information group is discriminated based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
[0010] According to another aspect of the present invention, there is provided a client-based weather warning device, comprising:
[0011] The instruction acquisition module is used to obtain the startup instruction corresponding to the target browser in the target client;
[0012] An information acquisition module, used to make a data request to a target application programming interface based on the startup instruction and a preset time mechanism, and determine a current weather information set corresponding to the startup instruction;
[0013] The weather warning module is used to format the current weather information set to obtain a target weather information group corresponding to the current weather information set, and to distinguish and process the target weather information group based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the client-based weather warning method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the client-based weather warning method described in any embodiment of the present invention when executed.
[0019] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the client-based weather warning method described in any embodiment of the present invention is implemented.
[0020] The technical solution of the embodiment of the present invention makes a data request to the target application programming interface through the startup instruction corresponding to the target browser in the target client and the preset time mechanism, and determines the current weather information set corresponding to the startup instruction. Then, the current weather information set is formatted to obtain the target weather information group corresponding to the current weather information set, and the target weather information group is discriminated based on the preset weather threshold to generate the target weather warning information corresponding to the startup instruction. Since the weather warning process is automatically run when the user opens the browser page, no manual operation is required, and it automatically checks whether there is bad weather and generates weather warning information. The problem of low efficiency in generating weather warning information on the client side is solved, automatic weather warning on the personal computer side can be realized, and the efficiency in generating weather warning information is improved.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a client-based weather warning method provided according to Embodiment 1 of the present invention;
[0024] Figure 2 is a flow chart of a client-based weather warning method provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a flowchart of an optional client-based weather warning method provided according to Embodiment 2 of the present invention;
[0026] Figure 4 is a data distribution flow chart of weather warning information provided according to Embodiment 2 of the present invention;
[0027] Figure 5 is a schematic structural diagram of a client-based weather warning device provided according to Embodiment 3 of the present invention;
[0028] Figure 6 It is a structural schematic diagram of an electronic device for implementing the client-based weather warning method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", "target", "preset", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] It is worth noting that in the technical solution of the present application, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse; if the user chooses to refuse, the expert decision-making process will be entered.
[0032] Embodiment 1
[0033] Figure 1 This is a flow chart of a client-based weather warning method provided in the first embodiment of the present invention. This embodiment is applicable to the case of automatic weather warning on a personal computer. The method can be executed by a client-based weather warning device. The client-based weather warning device can be implemented in the form of hardware and / or software. The client-based weather warning device can be configured in an electronic device. Exemplarily, it can be configured in a computer device with an integrated browser plug-in. Figure 1 As shown, the method includes:
[0034] S110: Obtain a startup instruction corresponding to a target browser in a target client.
[0035] The target client may refer to a client that needs to display a weather warning. Exemplarily, the target client may be a personal computer that needs to display a weather warning. The target browser may refer to a browser selected in the target client to display a weather warning. Usually, the target browser is configured with a corresponding browser plug-in, which is used to execute the weather warning method in the embodiment of the present invention.
[0036] The start instruction may refer to an instruction that triggers the target browser to respond. Exemplarily, the start instruction may be a click instruction of the target browser triggered by the user through a keyboard or a mouse. Specifically, when the user opens a website in the target browser of the target client and enters the corresponding page, a start instruction corresponding to the target browser in the target client is generated. The browser plug-in corresponding to the target browser may be triggered by the start instruction, so that the browser plug-in starts to automatically execute subsequent operations.
[0037] S120: Making a data request to a target application programming interface based on the startup instruction and a preset time mechanism to determine a current weather information set corresponding to the startup instruction.
[0038] Among them, the preset time mechanism may refer to a pre-set rule for evaluating the data request sending cycle. Exemplarily, the preset time mechanism may be every one hour or every two hours. The open application programming interface may refer to an application programming interface (API) that encapsulates service functions for third-party calls. The target application programming interface may refer to an open application programming interface that implements a weather query service. Exemplarily, the target application programming interface may be a map navigation software API. The data request may refer to a request to query weather information.
[0039] Among them, the current weather information may refer to the weather information corresponding to the environment where the target client is currently located. Exemplarily, the current weather information may be the temperature of the day, the weather phenomenon of the day, the wind force of the day, and the wind direction of the day. It is worth noting that the current weather information may be the weather information corresponding to the environment where the current moment is located throughout the day, or it may be the weather information corresponding to the environment where the current moment is located in the future time period, such as the weather information corresponding to the next two hours. The current weather information set may refer to the set composed of various current weather information corresponding to the same target client at the same time.
[0040] S130, formatting the current weather information set to obtain a target weather information group corresponding to the current weather information set, and performing discrimination processing on the target weather information group based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
[0041] The formatting process may refer to an operation of standardizing the current weather information set according to a preset format standard. Exemplarily, the formatting process may be an operation of uniformly storing the current weather information set using a preset object. The target weather information group may refer to a combination obtained after formatting the current weather information set. The target weather information may refer to each piece of weather information in the target weather information group.
[0042] Among them, the preset weather threshold may refer to a preset value for evaluating the target weather information in the target weather information group. Usually, the preset weather thresholds corresponding to different target weather information are different. Exemplarily, if the target weather information is the wind force of the day, the preset weather threshold may be wind force level eight; if the target weather information is the weather phenomenon of the day, the preset weather threshold may be precipitation of 500 mm, etc. Weather warning information may refer to warning prompt information generated based on the discrimination result of the discrimination processing. Target weather warning information may refer to weather warning information corresponding to the environment where the target client is currently located.
[0043] The technical solution of the embodiment of the present invention makes a data request to the target application programming interface through the startup instruction corresponding to the target browser in the target client and the preset time mechanism, and determines the current weather information set corresponding to the startup instruction. Then, the current weather information set is formatted to obtain the target weather information group corresponding to the current weather information set, and the target weather information group is discriminated based on the preset weather threshold to generate the target weather warning information corresponding to the startup instruction. Since the weather warning process is automatically run when the user opens the browser page, no manual operation is required, and it automatically checks whether there is bad weather and generates weather warning information. The problem of low efficiency in generating weather warning information on the client side is solved, automatic weather warning on the personal computer side can be realized, and the efficiency in generating weather warning information is improved.
[0044] Embodiment 2
[0045] Figure 2 A flowchart of a client-based weather warning method provided in the second embodiment of the present invention. This embodiment is refined based on the above embodiment. In this embodiment, the operation of making a data request to the target application programming interface based on the startup instruction and the preset time mechanism to determine the current weather information set corresponding to the startup instruction is refined. Specifically, it may include: determining the current location information and current time information corresponding to the target client based on the startup instruction, and generating a data request instruction based on the current location information; sending a data request instruction to the target application programming interface based on the current time information and the preset time mechanism to determine the current weather information set corresponding to the startup instruction. Figure 2 As shown, the method includes:
[0046] S210: Obtain a startup instruction corresponding to a target browser in a target client.
[0047] It is worth noting that in the embodiment of the present invention, the same target browser corresponds to the same user information. If the user uses the user information to log in to the target browser on other clients, automatic synchronization and automatic updating of multiple computers with the same account can be achieved, that is, the process of the weather warning method is automatically implemented. The embodiment of the present invention does not make additional elaborations on this.
[0048] S220. Determine the current location information and current time information corresponding to the target client based on the start instruction, and generate a data request instruction based on the current location information.
[0049] Among them, the current location information may refer to the location information corresponding to the environment where the target client is currently located. Exemplarily, the current location information may be the city code information corresponding to the environment where the target client is currently located. The current time information may refer to the time information corresponding to the environment where the target client is currently located. Exemplarily, the current time information may be the system time corresponding to the environment where the target client is currently located. The data request instruction may refer to a request instruction for querying weather information. Exemplarily, the data request instruction may be a request instruction for querying weather information of the current location information.
[0050] S230: Send a data request instruction to a target application programming interface based on the current time information and a preset time mechanism to determine a current weather information set corresponding to the start instruction.
[0051] Specifically, after obtaining the startup instruction corresponding to the target browser in the target client, the current location information and current time information corresponding to the target client can be obtained, and a data request instruction is generated based on the current location information. Then, based on the current time information and the preset time mechanism, a data request instruction is sent to the target application programming interface to determine the current weather information set corresponding to the startup instruction. As a result, the weather warning process is automatically run when the user opens the browser page of the target browser without any manual operation, thereby improving the efficiency of generating weather warning information.
[0052] In an optional embodiment, the sending of a data request instruction to the target application programming interface based on the current time information and the preset time mechanism to determine the current weather information set corresponding to the start instruction includes: determining the data request time corresponding to the start instruction based on the current time information and the preset time mechanism; sending a data request instruction to the target application programming interface based on the data request time to determine the current weather information set corresponding to the start instruction. Wherein, the data request time may refer to the time when the data request instruction is sent. Generally, the current time information can be periodically calculated based on the preset time mechanism to obtain the data request time. Exemplarily, if the current time information is 17:00, and the preset time mechanism is to send a data request instruction every hour, the data request time may be the whole time of 18:00 and 19:00, etc., which are spaced one hour apart. Thus, the data request time corresponding to the start instruction is determined by the current time information and the preset time mechanism, and the data request instruction is sent to the target application programming interface based on the data request time to determine the current weather information set corresponding to the start instruction. It can avoid the waste of resources caused by real-time data requests, and at the same time, the weather data can be updated regularly to ensure that the weather information has a certain timeliness.
[0053] It is worth noting that each data request time needs to be calculated under the same startup instruction. That is, if the current startup instruction is canceled, the operation of sending the data request instruction to the target application programming interface based on the data request time and determining the current weather information set corresponding to the startup instruction will no longer be executed until the next startup instruction appears. The new data request time is calculated based on the current time information corresponding to the next startup instruction, and the above operations are repeated.
[0054] S240: Format the current weather information set to obtain a target weather information group corresponding to the current weather information set.
[0055] In an optional embodiment, after the current weather information set is formatted to obtain a target weather information group corresponding to the current weather information set, it also includes: rendering the target weather information group based on a preset rendering mechanism to obtain a rendering information group corresponding to the target weather information group; and carousel processing the target rendering information in the rendering information group based on preset display rules to display the target rendering information.
[0056] The preset rendering mechanism may refer to a preset rule for rendering the target weather information group. Exemplarily, the preset rendering mechanism may be rendering using a semi-transparent bubble. The rendering information may refer to the target weather information obtained after rendering using the preset rendering mechanism. The rendering information group may refer to a collection of various rendering information at the same time.
[0057] Among them, the preset display rule may refer to a pre-set rule for evaluating the display time of the rendering information. Exemplarily, the preset display rule may be the display time interval of each rendering information. For example, the rendering information is displayed every 3000 milliseconds. The target rendering information may refer to the rendering information selected for display in the rendering information group. The carousel processing may refer to the operation of arranging and displaying the target rendering information in the rendering information group according to the storage order of each target rendering information in the rendering information group. Exemplarily, if the rendering information group is "temperature of the day, weather phenomenon of the day, wind force of the day, wind direction of the day", and the preset display rule is to display the rendering information every 3000 milliseconds, then the carousel processing may be to display the temperature rendering information of the day, display the weather phenomenon rendering information of the day after 3000 milliseconds, display the wind force rendering information of the day after 3000 milliseconds, and display the wind direction rendering information of the day after 3000 milliseconds.
[0058] Therefore, by displaying the weather information in the form of carousel bubbles, it is convenient for users to obtain weather information in a timely manner.
[0059] S250: performing discrimination processing on the target weather information in the target weather information group based on a preset weather threshold value to generate a discrimination result.
[0060] Among them, the discrimination result may refer to the result obtained after discrimination processing based on a preset weather threshold. Usually, the discrimination result can be used to determine whether the target weather information is bad weather. Exemplarily, the discrimination result may be a specific discrimination content, or it may be that there is no discrimination content. Specifically, if the target weather information is wind force level 10, and the preset weather threshold is wind force level 8, the discrimination result may be that the wind force is greater than level 8. If the target weather information is a precipitation of 400 mm, and the preset weather threshold is a precipitation of 500 mm, the discrimination result may be that there is no discrimination content. It is worth noting that if the discrimination result is that there is no discrimination content, it means that the target weather information is not bad weather, and there is no need for a weather warning. In addition, in an embodiment of the present invention, the target weather information may be weather information at the current moment, or it may be weather information at a future moment, such as weather information for the next two hours, and the embodiment of the present invention does not provide additional elaboration on this.
[0061] Therefore, by judging the weather information of each target based on the pre-set weather threshold, severe weather can be screened out, providing an effective basis for improving the accuracy of weather warning information.
[0062] S260: Fill in the determination result based on the information category of the target weather information to generate target weather warning information corresponding to the start instruction.
[0063] Among them, the information category may refer to the information type corresponding to the target weather information. Exemplarily, the information category may be the temperature of the day, the weather phenomenon of the day, the wind force of the day, and the wind direction of the day, etc. The filling process may refer to the operation of filling information according to a pre-set warning template. Exemplarily, if the target weather information is wind force level 10, the information category is the wind force of the day, and the judgment result is that the wind force is greater than level 8, then the target weather warning information of "the current wind force is level 10, please pay attention to safety when traveling" can be generated. Similarly, if the target weather information is precipitation of 600 mm, the information category is the weather phenomenon of the day, and the judgment result is that the precipitation exceeds 500 mm, then the target weather warning information of "there will be heavy rain today, please bring an umbrella" can be generated.
[0064] S270: Determine a target tab page corresponding to the target browser based on the startup instruction.
[0065] Among them, a tab page may refer to a page composed of tags. Usually, each tag represents an independent page or view, and the user can switch to the corresponding page by clicking different tags. The target tab page may refer to the tab page selected for display in the target browser. Usually, the tab page to be switched can be determined according to the startup instruction. It is worth noting that in the embodiment of the present invention, the target tab page can be one or more, and the embodiment of the present invention does not specifically limit this.
[0066] S280: Render the target weather warning information based on the target tab page to obtain rendered warning information corresponding to the target weather warning information.
[0067] The rendered warning information may refer to weather warning information obtained by rendering the target weather warning information. Exemplarily, the rendered warning information may be weather warning information obtained by rendering using a semi-transparent bubble.
[0068] Specifically, after filling the discrimination result based on the information category of the target weather information and generating the target weather warning information corresponding to the start instruction, the target weather warning information can be rendered according to the preset rendering mechanism to obtain the rendered warning information corresponding to the target weather warning information, and the rendered warning information is displayed on the target tab page. Thus, by inserting the weather warning information into the target tab page in the form of a carousel bubble, it is convenient for users to obtain weather warning information in a timely manner.
[0069] The technical solution of the embodiment of the present invention determines the current location information and current time information corresponding to the target client through the startup instruction corresponding to the target browser in the target client, and generates a data request instruction based on the current location information. Further, based on the current time information and the preset time mechanism, a data request instruction is sent to the target application programming interface to determine the current weather information set corresponding to the startup instruction, and the current weather information set is formatted to obtain the target weather information group corresponding to the current weather information set. Further, based on the preset weather threshold, the target weather information in the target weather information group is discriminated and processed to generate a discrimination result, and the discrimination result is filled based on the information category of the target weather information to generate the target weather warning information corresponding to the startup instruction. Finally, based on the startup instruction, the target tab page corresponding to the target browser is determined, and based on the target tab page, the target weather warning information is rendered and processed to obtain the rendering warning information corresponding to the target weather warning information. Since the weather warning process is automatically run when the user opens the browser page, no manual operation is required, and whether there is bad weather is automatically checked to generate weather warning information. The problem of low efficiency in generating weather warning information on the client side is solved, automatic weather warning on the personal computer side can be realized, and the efficiency in generating weather warning information is improved.
[0070] Figure 3The flowchart of an optional client-based weather warning method provided by an embodiment of the present invention is shown. Specifically, when a user opens any web page in a target browser of a target client, a startup instruction corresponding to the target browser in the target client is obtained, and then the current location information and current time information corresponding to the target client are determined based on the startup instruction, and a data request instruction is generated based on the current location information, and then the data request time corresponding to the startup instruction is determined based on the current time information and the preset time mechanism, and a data request instruction is sent to the target application programming interface based on the data request time to determine the current weather information set corresponding to the startup instruction. Further, the current weather information set is formatted to obtain a target weather information group corresponding to the current weather information set, and the target weather information group is rendered based on a preset rendering mechanism to obtain a rendering information group corresponding to the target weather information group, and the target rendering information in the rendering information group is carousel processed based on a preset display rule to display the target rendering information. At the same time, the target weather information in the target weather information group is discriminated based on the preset weather threshold to generate a discrimination result. If the discrimination result is a specific discrimination content, it indicates that the target weather information is bad weather. The discrimination result is filled based on the information category of the target weather information to generate the target weather warning information corresponding to the start instruction. Finally, the target tab page corresponding to the target browser is determined based on the start instruction, and the target weather warning information is rendered based on the target tab page to obtain the rendered warning information corresponding to the target weather warning information. In this way, the automatic weather warning of the client is realized.
[0071] Figure 4 The figure shows a data distribution flow chart of weather warning information provided by an embodiment of the present invention. Specifically, after the target browser in the target client is triggered, the browser plug-in corresponding to the target browser makes a data request to the target application programming interface based on the startup instruction and the preset time mechanism, determines the current weather information set corresponding to the startup instruction, and formats the current weather information set to obtain the target weather information group corresponding to the current weather information set. Then, the target weather information group is rendered based on the preset rendering mechanism to obtain the rendering information group corresponding to the target weather information group, and the target rendering information in the rendering information group is carousel-processed based on the preset display rules to display the target rendering information. Finally, the target weather information group is discriminated based on the preset weather threshold to generate the target weather warning information, and the target weather warning information is rendered based on the preset rendering mechanism to obtain the rendering warning information corresponding to the target weather warning information, and at the same time, the rendering warning information is displayed to the target tab page corresponding to the target browser.
[0072] Embodiment 3
[0073] Figure 5This is a schematic diagram of the structure of a client-based weather warning device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: an instruction acquisition module 310, an information acquisition module 320 and a weather warning module 330;
[0074] The instruction acquisition module 310 is used to acquire the startup instruction corresponding to the target browser in the target client;
[0075] The information acquisition module 320 is used to make a data request to the target application programming interface based on the startup instruction and the preset time mechanism to determine the current weather information set corresponding to the startup instruction;
[0076] The weather warning module 330 is used to format the current weather information set to obtain a target weather information group corresponding to the current weather information set, and to distinguish and process the target weather information group based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
[0077] The technical solution of the embodiment of the present invention makes a data request to the target application programming interface through the startup instruction corresponding to the target browser in the target client and the preset time mechanism, and determines the current weather information set corresponding to the startup instruction. Then, the current weather information set is formatted to obtain the target weather information group corresponding to the current weather information set, and the target weather information group is discriminated based on the preset weather threshold to generate the target weather warning information corresponding to the startup instruction. Since the weather warning process is automatically run when the user opens the browser page, no manual operation is required, and it automatically checks whether there is bad weather and generates weather warning information. The problem of low efficiency in generating weather warning information on the client side is solved, automatic weather warning on the personal computer side can be realized, and the efficiency in generating weather warning information is improved.
[0078] Optionally, the information acquisition module 320 may specifically include: a request generation unit and an information acquisition unit;
[0079] The request generating unit is used to determine the current location information and current time information corresponding to the target client based on the start instruction, and generate a data request instruction based on the current location information;
[0080] The information acquisition unit is used to send a data request instruction to the target application programming interface based on the current time information and the preset time mechanism, and determine the current weather information set corresponding to the start instruction.
[0081] Optionally, the information acquisition unit may be used to:
[0082] Determine the data request time corresponding to the start instruction based on the current time information and the preset time mechanism;
[0083] A data request instruction is sent to a target application programming interface based on the data request time, and a current weather information set corresponding to the start instruction is determined.
[0084] Optionally, the weather warning module 330 may be specifically used for:
[0085] Performing discrimination processing on the target weather information in the target weather information group based on a preset weather threshold value to generate a discrimination result;
[0086] The determination result is filled based on the information category of the target weather information to generate target weather warning information corresponding to the start instruction.
[0087] Optionally, the client-based weather warning device may also include: a first display module, which is used to render the target weather information group based on a preset rendering mechanism after formatting the current weather information set to obtain a target weather information group corresponding to the current weather information set, so as to obtain a rendering information group corresponding to the target weather information group; and to perform carousel processing on the target rendering information in the rendering information group based on preset display rules to display the target rendering information.
[0088] Optionally, the client-based weather warning device may also include: a second display module, which is used to determine the target tab page corresponding to the target browser based on the start-up instruction after the target weather information group is judged based on the preset weather threshold and the target weather warning information corresponding to the start-up instruction is generated; and render the target weather warning information based on the target tab page to obtain rendered warning information corresponding to the target weather warning information.
[0089] The client-based weather warning device provided in the embodiment of the present invention can execute the client-based weather warning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0090] Embodiment 4
[0091] Figure 6A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0092] like Figure 6 As shown, the electronic device 410 includes at least one processor 420, and a memory connected to the at least one processor 420 in communication, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 420 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 to the random access memory (RAM) 440. In the RAM 440, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 420, the ROM 430, and the RAM 440 are connected to each other via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.
[0093] Multiple components in the electronic device 410 are connected to the I / O interface 460, including: an input unit 470, such as a keyboard, a mouse, etc.; an output unit 480, such as various types of displays, speakers, etc.; a storage unit 490, such as a disk, an optical disk, etc.; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 4100 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0094] The processor 420 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 420 executes the various methods and processes described above, such as a client-based weather warning method.
[0095] The method includes:
[0096] Get the startup instruction corresponding to the target browser in the target client;
[0097] Performing a data request to a target application programming interface based on the startup instruction and a preset time mechanism to determine a current weather information set corresponding to the startup instruction;
[0098] The current weather information set is formatted to obtain a target weather information group corresponding to the current weather information set, and the target weather information group is discriminated based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
[0099] In some embodiments, the client-based weather warning method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 490. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the client-based weather warning method described above may be performed. Alternatively, in other embodiments, the processor 420 may be configured to perform the client-based weather warning method in any other appropriate manner (e.g., by means of firmware).
[0100] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0101] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0102] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0105] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0106] The present application also discloses a computer program product, which includes a computer program. When the computer program is executed by a processor, the computer program implements the client-based weather warning method provided in any embodiment of the present application. The program product and the client-based weather warning method disclosed in each embodiment of the present application belong to the same inventive concept, so it will not be described here.
[0107] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0108] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A client-based weather warning method, characterized in that: include: Get the startup instruction corresponding to the target browser in the target client; Performing a data request to a target application programming interface based on the startup instruction and a preset time mechanism to determine a current weather information set corresponding to the startup instruction; The current weather information set is formatted to obtain a target weather information group corresponding to the current weather information set, and the target weather information group is discriminated based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
2. The method according to claim 1, characterized in that The step of making a data request to a target application programming interface based on the startup instruction and a preset time mechanism to determine a current weather information set corresponding to the startup instruction includes: Determine the current location information and current time information corresponding to the target client based on the start instruction, and generate a data request instruction based on the current location information; Based on the current time information and the preset time mechanism, a data request instruction is sent to the target application programming interface to determine the current weather information set corresponding to the start instruction.
3. The method according to claim 2, characterized in that The sending of a data request instruction to a target application programming interface based on the current time information and a preset time mechanism to determine a current weather information set corresponding to the start instruction includes: Determine the data request time corresponding to the start instruction based on the current time information and the preset time mechanism; A data request instruction is sent to a target application programming interface based on the data request time, and a current weather information set corresponding to the start instruction is determined.
4. The method according to claim 1, characterized in that The step of performing discrimination processing on the target weather information group based on a preset weather threshold to generate target weather warning information corresponding to the start instruction includes: Performing discrimination processing on the target weather information in the target weather information group based on a preset weather threshold value to generate a discrimination result; The determination result is filled based on the information category of the target weather information to generate target weather warning information corresponding to the start instruction.
5. The method according to claim 1, characterized in that After the current weather information set is formatted and the target weather information group corresponding to the current weather information set is obtained, the method further includes: Rendering the target weather information group based on a preset rendering mechanism to obtain a rendering information group corresponding to the target weather information group; The target rendering information in the rendering information group is subjected to carousel processing based on a preset display rule to display the target rendering information.
6. The method according to claim 1, characterized in that After the target weather information group is discriminated based on the preset weather threshold and the target weather warning information corresponding to the start instruction is generated, the method further includes: Determine a target tab page corresponding to the target browser based on the startup instruction; The target weather warning information is rendered based on the target tab page to obtain rendered warning information corresponding to the target weather warning information.
7. A client-based weather warning device, characterized in that: include: The instruction acquisition module is used to obtain the startup instruction corresponding to the target browser in the target client; An information acquisition module, used to make a data request to a target application programming interface based on the startup instruction and a preset time mechanism, and determine a current weather information set corresponding to the startup instruction; The weather warning module is used to format the current weather information set to obtain a target weather information group corresponding to the current weather information set, and to distinguish and process the target weather information group based on a preset weather threshold to generate target weather warning information corresponding to the start instruction.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the client-based weather warning method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the client-based weather warning method described in any one of claims 1-6 when executed.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the client-based weather warning method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Geographical location information-based display method and geographical location information-based display device
CN103051703A
Weather push method and apparatus
CN106055591A
Session reminding method, device and equipment
CN114390017A
Service information notification method and device, electronic equipment and storage medium
CN115757970A