CN113805975B - Service execution method, device and storage medium - Google Patents

Service execution method, device and storage medium Download PDF

Info

Publication number
CN113805975B
CN113805975B CN202110927099.XA CN202110927099A CN113805975B CN 113805975 B CN113805975 B CN 113805975B CN 202110927099 A CN202110927099 A CN 202110927099A CN 113805975 B CN113805975 B CN 113805975B
Authority
CN
China
Prior art keywords
service
module
processing module
terminal
path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110927099.XA
Other languages
Chinese (zh)
Other versions
CN113805975A (en
Inventor
陈天鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Glory Smart Technology Development Co ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110927099.XA priority Critical patent/CN113805975B/en
Publication of CN113805975A publication Critical patent/CN113805975A/en
Application granted granted Critical
Publication of CN113805975B publication Critical patent/CN113805975B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a service execution method, a service execution device and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: let i be 1, the service system registers the ith processing module of each service path in the plurality of service paths; the ith processing module registers an acquisition unit, and the acquisition unit acquires detection information and reports the detection information to the ith processing module; the ith processing module reports a notification message to the service system when the detection information reported by the registered acquisition unit meets a preset condition; if the service system receives a notification message reported by the ith processing module of one or more service paths, executing a service function when the ith processing module of at least one service path in the one or more service paths is the last processing module; otherwise, let i be i +1, and return to the step of the service system registering the ith processing module of each service path. The application has the advantages of wide applicable scene and high flexibility, and can ensure the normal operation of the service.

Description

Service execution method, device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for executing a service.
Background
In order to correctly identify the environment in which the user is located, a geofencing mechanism should be generated. Geofences are a virtual geographic boundary bounded by a virtual fence that defines a particular geographic area. Thus, the terminal can identify whether the user enters a particular geographic area using the geofence.
Disclosure of Invention
The application provides a service execution method, a service execution device and a storage medium.
In some scenarios, when a user enters a geographic area, a corresponding service may be provided to the user. For example, if the geo-fence is used to define a geographic area of a certain shopping mall, the terminal may recognize whether the user enters the shopping mall using the geo-fence, and push shopping information related to the shopping mall if the user enters the shopping mall. However, the use of the geo-fence can only identify whether the user enters a specific geographic area, other states of the user are difficult to obtain, and the use scene is single and lacks flexibility.
In a first aspect, a method for service execution is provided. The method is applied to a terminal which comprises a service system, wherein the service system corresponds to a plurality of service paths for realizing the same service function, and each service path in the plurality of service paths comprises one or more processing modules. In the method, i is equal to 1, and the service system registers the ith processing module of each service path. And then, registering an acquisition unit by the ith processing module of each service path, wherein the acquisition unit is used for acquiring detection information and reporting the acquired detection information to the processing module of the registered acquisition unit. For any service path, if the ith processing module of one service path determines that the detection information reported by the registered acquisition unit meets the preset condition, reporting a notification message to a service system. Finally, if the service system receives the notification message reported by the ith processing module of one or more service paths, the service system executes the service function under the condition that the ith processing module of at least one service path in the one or more service paths is the last processing module; and under the condition that the ith processing module of one or more service paths is not the last processing module, enabling i to be i +1, and re-executing the step of registering the ith processing module of each service path and subsequent steps by the service system.
A business system is a system for performing business functions. The service path is used to implement a service function. That is, if all processing modules in the service path are triggered, the service system may execute the service function. The service function may be some functions related to the user, for example, some functions related to the user traveling, specifically some functions related to the flight, or some functions related to the subway, and the like.
The processing module is a module for acquiring the detection information and judging whether the acquired detection information meets a preset condition. If the processing module determines that the acquired detection information meets the preset condition, the processing module may report a notification message to the service system. And after receiving the notification message reported by the processing module, the service system determines that the processing module is triggered. The detection information may be information obtained by detecting some attributes (including time, geographical location, on-off screen state, etc.) of the terminal itself. The preset condition may be some preset conditions, and the environment or state where the terminal is currently located may be determined by the preset condition.
The processing module may acquire the detection information through one or more acquisition units. The acquisition unit is a unit for acquiring detection information. The acquisition unit may listen to the underlying interface to acquire relevant detection information. After the acquisition unit acquires the detection information, the acquisition unit may report the acquired detection information to the processing module, for example, the acquisition unit may report the detection information to the processing module periodically. The processing module and the acquisition unit both have certain computing capacity and storage capacity.
The business system, the processing module and the acquisition unit are in a hierarchical relationship, the business system can register the processing module, and the processing module can register the acquisition unit. After the business system registers the processing module, the processing module stores a subscription relationship, and the subscription relationship indicates that the processing module needs to report the notification message when some detection information meets some preset conditions. In this case, the processing module may register a corresponding acquisition unit according to the subscription relationship, where the acquisition unit is configured to acquire the detection information indicated in the subscription relationship. After the processing module registers the acquisition unit, the acquisition unit can acquire the detection information and continuously report the acquired detection information to the processing module. After receiving the detection information reported by the acquisition unit, the processing module may report a notification message to the service system if it is determined that the reported detection information satisfies the preset condition indicated in the subscription relationship. After receiving the notification message reported by the processing module, the service system determines that the processing module is triggered, and determines that the terminal is in a certain environment or state at the moment.
The one or more processing modules in the traffic path are in chain trigger mode, in other words, the one or more processing modules in the traffic path are registered in sequence. Specifically, when a service system needs to execute a service function, a first processing module in a service path is registered, a second processing module is registered after the first processing module is triggered, a third processing module is registered after the second processing module is triggered, and so on until a last processing module is registered, and after the last processing module is triggered, the service system determines that a series of environments or states where a terminal is located meet requirements, and then the service function can be executed.
In the application, the service system can determine a series of environments or states of the terminal through the triggered condition of one or more processing modules in each service path in the plurality of service paths, so that the service system can be applied to more scenes and has higher flexibility. Moreover, because a plurality of service paths are set, the processing module in one service path cannot be triggered due to the fact that the processing module in the service path or the acquisition unit at the lower layer cannot function because of problems, namely, the processing module in the service path fails, and the service path is not communicated, the service system can continue the service flow through other service paths, so that normal operation of the service can be ensured.
Optionally, if the ith processing module of one service path does not receive the detection information reported by one registered acquisition unit for a preset duration, the ith processing module of the service path registers the designated acquisition unit, and when the designated acquisition unit reports the designated detection information, the ith processing module of the service path queries the detection information required to be acquired by the acquisition unit.
Under normal conditions, the ith processing module passively receives the detection information reported by the acquisition unit. Under special circumstances, if the acquisition unit does not report the detection information for a long time, which indicates that the acquisition unit has a problem, the ith processing module can actively inquire the detection information. Moreover, the ith processing module can register the specified acquisition unit, and then actively inquires the detection information when the specified acquisition unit reports the specified detection information. Therefore, the ith processing module actively queries the detection information when the terminal is in the specified environment or state indicated by the specified detection information, so that the query success rate of the detection information can be improved.
Illustratively, the appointed acquisition unit is configured to acquire on-off screen state information of the terminal, and the appointed detection information is configured to indicate that the terminal is in an on-screen state. That is to say, when the acquisition unit does not report the detection information for a long time, the ith processing module may actively query the detection information that should be acquired by the acquisition unit when the terminal is in a bright screen state. When the terminal is in a bright screen state, most system functions of the terminal are in a normal running state, so that the ith processing module actively inquires the detection information at the moment, and the success rate is high.
Optionally, the plurality of traffic paths includes a first traffic path and a second traffic path. The first service path includes a first processing module, and the first processing module is configured to obtain a plurality of detection information and determine whether each detection information in the plurality of detection information satisfies a corresponding preset condition. The second service path includes a plurality of second processing modules, the plurality of second processing modules are configured to obtain a plurality of detection information one by one, and each second processing module is configured to determine whether the obtained detection information satisfies a corresponding preset condition.
That is, the first processing module and the plurality of second processing modules function identically. Thus, the first processing module and the plurality of second processing modules can be mutually standby. That is, if the first processing module fails due to its own failure or due to a problem occurring in a plurality of acquisition units of its lower layer, the business process may also continue through a plurality of second processing modules. Similarly, if a plurality of second processing modules fail due to problems of the second processing modules or due to problems of the acquisition units on the lower layer, the business process can be continued through the first processing module. Therefore, the normal operation of the service can be further ensured.
In this case, if the service system receives the notification message reported by the first processing module, the second service path is removed, and the registered processing module in the second service path can be cancelled, and the other processing modules in the second service path are not registered any more. If the service system receives the notification message reported by the last processing module of the plurality of second processing modules, the first service path is removed, the registered processing module in the first service path can be cancelled, and the other processing modules in the first service path are not registered any more.
Optionally, the business function is a flight related function. The first processing module in the first business path is an airport module, and the acquisition unit registered by the airport module comprises a time unit and a geographic unit; the time unit is used for collecting the time of the terminal and reporting the time to the airport module, the geographic unit is used for collecting the geographic position of the terminal and reporting the geographic position to the airport module, the airport module is used for reporting a notification message to a service system when the time of the terminal is within a first time period and the geographic position of the terminal is within the range of the geographic position of the airport, and the first time period is a time period from the first time before the boarding time to the boarding time. The plurality of second processing modules in the second service path sequentially comprise a time module and a geographic module; the acquisition unit registered by the time module comprises a time unit, the time unit is used for acquiring the time of the terminal and reporting the time to the time module, the time module is used for reporting a notification message to the service system when the time of the terminal is within a second time period, and the second time period is a time period from a second time after the first time and before the boarding time to the boarding time; the acquisition unit registered by the geographic module comprises a geographic unit, the geographic unit is used for acquiring the geographic position of the terminal and reporting the geographic position to the geographic module, and the geographic module is used for reporting a notification message to the service system when the geographic position of the terminal is within the range of the geographic position.
In this application, since the first time period and the second time period are both time periods before the boarding time, and the start time of the first time period is earlier than the second time period, if the service system does not receive the notification message reported by the airport module when receiving the notification message reported by the time module, it is indicated that the time module has been triggered, the time of the terminal has reached the second time period, but the airport module has not been triggered, the airport module is likely to have a problem, and at this time, the service system may cancel the airport module, remove the first service path, and continue to register the next processing module of the second service path, that is, the geographic module. Therefore, under the condition that the airport module in the first service path fails, the service system can continue the service process through the time module and the geographic module in the second service path, and normal operation of the service is realized.
Optionally, the processing modules in the first service path and the second service path further include a short message module, and the short message module is located before the first processing module and before the plurality of second processing modules. The acquisition unit registered by the short message module comprises a short message unit, the short message unit is used for acquiring the short message content of the terminal and reporting the short message content to the short message module, and the short message module is used for reporting a notification message carrying air ticket information to the service system when the short message content contains the air ticket information.
In the application, after receiving the notification message reported by the short message module, the service system determines that the short message module is triggered, namely, determines that the terminal needs to arrive at an airport before boarding time. At this time, the service system may register the next process module in the first service path, i.e., the airport module, while registering the next process module in the second service path, i.e., the time module, to determine whether the terminal arrives at the airport before the boarding time through the airport module or the time module.
Optionally, the processing modules in the first service path and the second service path further include a home-to-home module, and the home-to-home module is located behind the first processing module and behind the plurality of second processing modules. The acquisition unit registered by the home-to-home module comprises a wireless network unit, the wireless network unit is used for acquiring the name of a wireless network connected with the terminal and reporting the name to the home-to-home module, and the home-to-home module is used for reporting a notification message to the service system when the name of the wireless network connected with the terminal is the name of the home wireless network. In the application, after receiving the notification message reported by the home leaving module, the service system determines that the home leaving module is triggered, that is, determines that the terminal arrives at home through an airplane, and ends the service process, thereby executing the final service function.
Optionally, the plurality of service paths further include a third service path and/or a fourth service path, where the third service path includes a sleep module, and the fourth service path includes a navigation module. The acquisition unit registered by the sleep module comprises a sleep unit, the sleep unit is used for acquiring sleep monitoring information of a user carrying the terminal and reporting the sleep monitoring information to the sleep module, and the sleep module is used for reporting a notification message to the service system when the sleep monitoring information indicates that the user enters a sleep state. The acquisition unit registered by the navigation module comprises a navigation unit, the navigation unit is used for acquiring the navigation information of the terminal and reporting the navigation information to the navigation module, and the navigation module is used for reporting a notification message to the service system when the destination in the navigation information is a home address.
In the application, after receiving the notification message reported by the sleep module, the service system determines that the sleep module is triggered, that is, determines that the user has entered the sleep state, and then determines that the user is likely to arrive at home through the airplane, and the service process is finished, so that the final service function can be executed. Therefore, under the condition that the processing modules in the first service path and the second service path are both invalid, the service system can also realize the service flow through the sleep module, and the normal operation of the service is ensured.
After receiving the notification message reported by the navigation module, the service system determines that the navigation module is triggered, that is, determines that the user has gone home, and then determines that the user is likely to arrive at home via the airplane, and the service process is finished, so that the final service function can be executed. Therefore, under the condition that the processing modules in the first service path and the second service path are both invalid, the service system can also realize the service flow through the sleep module, and the normal operation of the service is ensured.
In a second aspect, a service execution device is provided, where the service execution device has a function of implementing the behavior of the service execution method in the first aspect. The service execution device comprises a service system, a processing module and an acquisition unit, and the service system, the processing module and the acquisition unit are used for realizing the service execution method provided by the first aspect.
In a third aspect, a service execution device is provided, where the structure of the service execution device includes a processor and a memory, and the memory is used to store a program that supports the service execution device to execute the service execution method provided in the first aspect, and store data used to implement the service execution method in the first aspect. The processor is configured to execute programs stored in the memory. The service execution apparatus may further include a communication bus for establishing a connection between the processor and the memory.
In a fourth aspect, a computer-readable storage medium is provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute the service execution method according to the first aspect.
In a fifth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the service execution method of the first aspect.
The technical effects obtained by the second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 2 is a block diagram of a software system of a terminal according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a first implementation environment provided by embodiments of the present application;
FIG. 4 is a schematic diagram of a second implementation environment provided by embodiments of the present application;
FIG. 5 is a schematic diagram of a third implementation environment provided by embodiments of the present application;
fig. 6 is a flowchart of a service execution method provided in an embodiment of the present application;
FIG. 7 is a diagram illustrating an alert message provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a fourth implementation environment provided by embodiments of the present application;
FIG. 9 is a schematic diagram of a fifth exemplary implementation environment provided by embodiments of the present application;
FIG. 10 is a schematic diagram of a sixth implementation environment provided by embodiments of the present application;
FIG. 11 is a schematic diagram of a seventh implementation environment provided in the embodiments of the present application;
fig. 12 is a schematic structural diagram of a service execution device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference to "a plurality" in this application means two or more. In the description of the present application, "/" means "or" unless otherwise stated, for example, a/B may mean a or B; "and/or" herein is only an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, for the convenience of clearly describing the technical solutions of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
Before explaining the embodiments of the present application in detail, a terminal according to the embodiments of the present application will be explained.
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application. Referring to fig. 1, the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the terminal 100. In other embodiments of the present application, terminal 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an exemplary illustration, and does not limit the structure of the terminal 100. In other embodiments of the present application, the terminal 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The terminal 100 implements a display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the terminal 100 may include 1 or N display screens 194, where N is an integer greater than 1.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can implement applications such as intelligent recognition of the terminal 100, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
Next, a software system of the terminal 100 will be explained.
The software system of the terminal 100 may adopt a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, an Android (Android) system with a layered architecture is taken as an example to exemplarily describe a software system of the terminal 100.
Fig. 2 is a block diagram of a software system of the terminal 100 according to an embodiment of the present disclosure. Referring to fig. 2, the layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android run time (Android runtime) and system layer, and a kernel layer from top to bottom.
The application layer may include a series of application packages. As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions. As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like. The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data, which may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc., and makes the data accessible to applications. The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system can be used for constructing a display interface of an application program, and the display interface can be composed of one or more views, such as a view for displaying a short message notification icon, a view for displaying characters and a view for displaying pictures. The phone manager is used to provide communication functions of the terminal 100, such as management of call states (including connection, disconnection, etc.). The resource manager provides various resources, such as localized strings, icons, pictures, layout files, video files, etc., to the application. The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. For example, a notification manager is used to notify download completion, message alerts, and the like. The notification manager may also be a notification that appears in the form of a chart or scrollbar text at the top status bar of the system, such as a notification of a background running application. The notification manager may also be a notification that appears on the screen in the form of a dialog window, such as prompting a text message in a status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system. The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules, such as: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following exemplifies the workflow of the software and hardware of the terminal 100 in conjunction with the navigation application start scenario.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the original input event. Taking the touch operation as a click operation, and taking the control corresponding to the click operation as the control of the navigation application icon as an example, the navigation application calls the interface of the application program framework layer, starts the navigation application, then calls the kernel layer to start the display driver, and displays the application interface of the navigation application through the display screen 194.
Next, an implementation environment provided by the embodiment of the present application will be described.
Fig. 3 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to fig. 3, the implementation environment includes a business system 300, a business path 301 for implementing business functions. The traffic system 300 corresponds to a traffic path 301, the traffic path 301 comprising one or more processing modules 302.
Business system 300 is a system for performing business functions. The traffic path 301 is used to implement traffic functions. That is, if all processing modules 302 in the traffic path 301 are triggered, the traffic system 300 can perform the traffic function. The service function may be some functions related to the user, for example, some functions related to the user traveling, specifically some functions related to the flight, or some functions related to the subway, and the like.
The processing module 302 is a module for acquiring the detection information and determining whether the acquired detection information satisfies a preset condition. If the processing module 302 determines that the acquired detection information meets the preset condition, the processing module 302 may report a notification message to the service system 300. After receiving the notification message reported by the processing module 302, the service system 300 determines that the processing module 302 is triggered.
The detection information may be information obtained by detecting some attributes (including time, geographical location, on-off screen state, etc.) of the terminal itself. The preset condition may be some preset conditions, and the environment or state where the terminal is currently located may be determined by the preset condition. For example, the processing module 302 may obtain the geographic location of the terminal and determine whether the geographic location of the terminal is within the geographic location range, so as to determine whether the terminal enters the airport, that is, whether the user enters the airport.
Referring to fig. 3, the processing module 302 may acquire detection information through one or more acquisition units 303. The acquisition unit 303 is a unit for acquiring detection information. The acquisition unit 303 may listen to the underlying interface to acquire relevant detection information. After the acquisition unit 303 acquires the detection information, the acquired detection information may be reported to the processing module 302, for example, the acquisition unit 303 may report the detection information to the processing module 302 periodically. The processing module 302 and the acquisition unit 303 both have certain computing power and storage capacity.
The business system 300, the processing module 302 and the collection unit 303 are in a hierarchical relationship, the business system 300 can register the processing module 302, and the processing module 302 can register the collection unit 303. After the service system 300 registers the processing module 302, the processing module 302 stores a subscription relationship indicating that the processing module 302 needs to report a notification message when some detection information meets some preset conditions. In this case, the processing module 302 may register a corresponding collecting unit 303 according to the subscription relationship, where the collecting unit 303 is configured to collect the detection information indicated in the subscription relationship. After the processing module 302 registers the collecting unit 303, the collecting unit 303 can collect the detection information and continuously report the collected detection information to the processing module 302. After receiving the detection information reported by the acquisition unit 303, the processing module 302 may report a notification message to the service system 300 if it is determined that the reported detection information meets the preset condition indicated in the subscription relationship. After receiving the notification message reported by the processing module 302, the service system 300 determines that the processing module 302 is triggered, and thus determines that the terminal is in a certain environment or state.
One or more processing modules 302 in the traffic path 301 are in a chain triggered mode, in other words, one or more processing modules 302 in the traffic path 301 are sequentially registered. Specifically, when the service system 300 needs to execute a service function, the first processing module 302 in the service path 301 is registered, the second processing module 302 is registered after the first processing module 302 is triggered, the third processing module 302 is registered after the second processing module 302 is triggered, and so on until the last processing module 302 is registered, and after the last processing module 302 is triggered, the service system 300 determines that a series of environments or states where the terminal is located meet requirements, and then the service function can be executed.
In this case, if one processing module 302 in the service path 301 fails to function due to a problem occurring in itself or due to a problem occurring in the acquisition unit 303 of the lower layer, the processing module 302 cannot be triggered, that is, the processing module 302 fails, so that the service system 300 cannot continue to register the next processing module 302, at this time, the service path 301 is not through, the whole set of service flow is not feasible, and normal operation of the service is affected.
For this reason, referring to fig. 4, in the embodiment of the present application, a plurality of service paths 301 for implementing the same service function are provided, the plurality of service paths 301 all correspond to the service system 300, each service path 301 in the plurality of service paths 301 includes one or more processing modules 302, and each processing module 302 may acquire detection information through one or more acquisition units 303. In this case, even if the processing module 302 in one service path 301 fails and the service path 301 is not connected, the service system 300 may continue the service flow through other service paths, so as to ensure normal operation of the service.
In some embodiments, referring to fig. 5, the plurality of traffic paths 301 may include a first traffic path 3011 and a second traffic path 3012.
The first traffic path 3011 includes a first processing module 3021. The first processing module 3021 is configured to obtain a plurality of detection information, and determine whether each of the plurality of detection information satisfies a corresponding preset condition. That is, the first processing module 3021 needs to register a plurality of acquisition units 3031 to acquire the plurality of detection information required one by one.
The second traffic path 3012 includes a plurality of second processing modules 3022. The second processing modules 3022 are configured to obtain the detection information one by one, and each of the second processing modules 3022 is configured to determine whether the obtained detection information satisfies a corresponding preset condition. That is, each of the plurality of second processing modules 3022 needs to register one acquisition unit 3032 to acquire one required piece of detection information.
In this case, the acquisition capabilities of the underlying plurality of acquisition units 303 (i.e., the plurality of acquisition units 3031 and the plurality of acquisition units 3032) on which the first processing module 3021 and the plurality of second processing modules 3022 depend are substantially the same, that is, the first processing module 3021 and the plurality of second processing modules 3022 function identically. In this manner, the first processing module 3021 and the plurality of second processing modules 3022 may be a backup for each other. That is, if the first processing module 3021 fails due to its own problems or due to problems occurring in the underlying acquisition units 3031, the business process may also continue through the second processing modules 3022. Similarly, if one of the second processing modules 3022 in the plurality of second processing modules 3022 fails due to a problem with itself or due to a problem with the underlying acquisition unit 3032, the business process may also continue through the first processing module 3021. Therefore, the normal operation of the service can be further ensured.
Next, a service execution method provided in the embodiment of the present application is described in detail.
Fig. 6 is a flowchart of a service execution method according to an embodiment of the present application. The method is applied to a terminal which comprises a service system, wherein the service system corresponds to a plurality of service paths for realizing the same service function, and each service path in the plurality of service paths comprises one or more processing modules. Referring to fig. 6, the method includes the steps of:
step 601: let i equal to 1, the service system registers the ith processing module of each service path.
The business system is a system for performing business functions. The service function may be some functions related to the user, for example, some functions related to the user traveling, specifically some functions related to the flight, or some functions related to the subway, and the like.
When the service system needs to execute the service function, the service function can be implemented through the multiple service paths, so that the service system needs to register the ith processing module of each service path. At the very beginning, the business system may have i equal to 1 so that the 1 st processing module of each business path may be registered to start the business process.
After the service system registers the ith processing module of each service path, a subscription relationship is stored in the ith processing module, and the subscription relationship indicates that the ith processing module needs to report a notification message when some detection information meets some preset conditions. For example, the ith processing module of a certain service path is an airport module, and after the service system registers the airport module, a subscription relationship is stored in the airport module, where the subscription relationship indicates that the airport module needs to report a notification message when the terminal is determined to enter the airport at 7:00 to 8:00, that is, indicates that the airport module needs to report a notification message when the terminal is located at 7:00 to 8:00 and the geographic position of the terminal is within the range of the geographic position of the airport. In this case, if the service system receives the notification message reported by the airport module, it determines that the airport module is triggered, and also determines that the terminal enters the airport at 7:00 to 8: 00.
Step 602: the ith processing module of each service path registers the acquisition unit.
Since the subscription relationship in the ith processing module of each service path indicates that the ith processing module needs to report the notification message when some detection information meets some preset conditions, the ith processing module needs to register the acquisition unit to acquire the detection information. Each acquisition unit is used for acquiring detection information and reporting the acquired detection information to a processing module which registers the acquisition unit. Each acquisition unit can monitor the underlying interface to acquire relevant detection information, and can periodically report the detection information to the processing module registered with the acquisition unit.
For example, the ith processing module of a certain traffic path is an airport module, and the subscription relationship in the airport module indicates that the airport module needs to report a notification message when the terminal is located at 7:00 to 8:00 and the geographic location of the terminal is within the range of the geographic location of the airport module. That is, the detection information that the airport module needs to acquire is the time the terminal is located and the geographic location of the terminal. In this case, the acquisition units registered by the airport module may include time units and geographic units. The time unit is used for collecting the time of the terminal and reporting the time of the terminal to the airport module. The geographic unit is used for collecting the geographic position of the terminal and reporting the geographic position of the terminal to the airport module.
In some embodiments, for any service path, if the ith processing module of the service path does not receive the detection information reported by a registered acquisition unit for a preset duration, it indicates that the acquisition unit may fail to acquire the detection information due to its own problems, or fails to report the detection information although acquiring the detection information, at this time, the ith processing module may register a designated acquisition unit, and the ith processing module may query the detection information required to be acquired by the acquisition unit when the designated acquisition unit reports the designated detection information.
That is to say, under normal conditions, the ith processing module passively receives the detection information reported by the acquisition unit. Under special circumstances, if the acquisition unit does not report the detection information for a long time, which indicates that the acquisition unit has a problem, the ith processing module can actively inquire the detection information. And the ith processing module can register the appointed acquisition unit, and then actively inquire the detection information when the appointed acquisition unit reports the appointed detection information. Therefore, the ith processing module actively queries the detection information when the terminal is in the specified environment or state indicated by the specified detection information, so that the query success rate of the detection information can be improved.
The preset time length can be preset, and the preset time length can be set to be longer, for example, the preset time length can be 1 second, 2 seconds and the like. Illustratively, the appointed acquisition unit is configured to acquire on-off screen state information of the terminal, and the appointed detection information is configured to indicate that the terminal is in an on-screen state. That is to say, when the acquisition unit does not report the detection information for a long time, the ith processing module may actively query the detection information that should be acquired by the acquisition unit when the terminal is in a bright screen state. When the terminal is in a bright screen state, most system functions of the terminal are in a normal running state, so that the ith processing module actively inquires the detection information at the moment, and the success rate is high.
For example, the ith processing module of a certain traffic path is an airport module, and the acquisition unit registered by the airport module comprises a time unit and a geographic unit. The time unit is used for collecting the time of the terminal and reporting the time of the terminal to the airport module. The geographic unit is used for collecting the geographic position of the terminal and reporting the geographic position of the terminal to the airport module. If the airport module does not receive the report of the geographic unit for a long time, the problem of the geographic unit can be determined. At this time, the airport module can register a screen on-off unit, and the screen on-off unit is used for acquiring screen on-off state information of the terminal and reporting the screen on-off state information to the airport module. If the airport module receives the information of the screen lightening and extinguishing state reported by the screen lightening and extinguishing unit and indicates that the terminal is in the screen lightening state, the airport module can actively inquire the geographic position of the terminal.
Step 603: for any service path, if the ith processing module of the service path determines that the detection information reported by the registered acquisition unit meets the preset condition, reporting a notification message to the service system.
After the ith processing module of the service path receives the detection information reported by the registered acquisition unit, if the reported detection information is determined to meet the corresponding preset condition in the subscription relationship, a notification message can be reported to the service system.
For example, the ith processing module of the traffic path is an airport module, and the subscription relationship in the airport module indicates that the airport module needs to report a notification message when the terminal is located at 7:00 to 8:00 and the geographic location of the terminal is within the range of the geographic location of the airport module. The acquisition unit registered by the airport module comprises a time unit and a geographic unit. If the time of the terminal reported by the airport module receiving the time unit is 7:00 to 8:00 and the geographical position of the terminal reported by the geographical unit is within the range of the geographical position of the airport, the airport module can report a notification message to the service system.
Step 604: if the service system receives the notification message reported by the ith processing module of one or more service paths, judging whether the ith processing module of at least one service path in the one or more service paths is the last processing module.
If the service system receives the notification message reported by the ith processing module of one or more service paths, which indicates that the ith processing module of the one or more service paths has been triggered, the service system may determine that the terminal is currently in a specific environment or state.
If the ith processing module of at least one service path in the one or more service paths is the last processing module, it indicates that all the processing modules in at least one service path are triggered, that is, the service flow is completed.
If the ith processing module of the one or more service paths is not the last processing module, it indicates that each service path in the one or more service paths has a processing module that has not been triggered, i.e. the service flow is not completed.
Step 605: and under the condition that the ith processing module of at least one service path in the one or more service paths is the last processing module, the service system executes service functions.
In the case that the ith processing module of at least one service path in the one or more service paths is the last processing module, and the service process is completed, the service system may determine that a series of environments or states where the terminal is located meet requirements, and thus may execute a service function.
Step 606: and under the condition that the ith processing module of the one or more service paths is not the last processing module, enabling i to be i +1, and re-executing the step of registering the ith processing module of each service path and subsequent steps by the service system.
If the service flow is not completed yet in the case that the ith processing module of the one or more service paths is not the last processing module, the service system needs to continue registering the next processing module to continue the service flow in the case that the ith processing module is triggered. Therefore, it is necessary to make i equal to i +1, and re-execute the step of registering the ith processing module of each service path and the subsequent steps by the service system.
It should be noted that, for any of the one or more traffic paths, when the ith processing module of the traffic path is triggered, it indicates that the terminal is in a certain environment or state, in this case, even if the ith processing module of the traffic path is not the last processing module of the traffic path, the traffic system may provide some related services. For example, the ith processing module of the traffic path is an airport module, which is not the last processing module of the traffic path. When receiving the notification message reported by the airport module, the service system may determine that the terminal enters the airport within a specific time period, and then the service system may provide some boarding-related services, for example, as shown in fig. 7, the service system may display a warning message on the terminal, where the warning message may include boarding time, terminal building, and other information to remind the user of which terminal should board at which terminal before which time.
In the embodiment of the application, the service system corresponds to a plurality of service paths for realizing the same service function, and each service path in the plurality of service paths comprises one or more processing modules. Under the condition, when the processing module in one service path cannot act due to the problem of the processing module or the acquisition unit at the lower layer of the processing module, the processing module in the service path cannot be triggered, namely the processing module in the service path fails, so that the service path cannot be communicated, the service system can continue the service flow through other service paths, and the normal operation of the service can be ensured.
In some embodiments, the plurality of traffic paths includes a first traffic path and a second traffic path. The first traffic path includes a first processing module. The first processing module is used for acquiring a plurality of detection information and judging whether each detection information in the plurality of detection information meets a corresponding preset condition. That is, the first processing module needs to register a plurality of acquisition units to acquire the plurality of detection information required one by one. The second traffic path includes a plurality of second processing modules. The plurality of second processing modules are used for acquiring the plurality of detection information one by one, and each second processing module is used for judging whether the acquired detection information meets the corresponding preset condition. That is, each of the plurality of second processing modules needs to register one acquisition unit to acquire one required detection information.
The acquisition capabilities of the underlying plurality of acquisition units on which the first processing module and the plurality of second processing modules depend are substantially the same, and the first processing module and the plurality of second processing modules function the same. Thus, the first processing module and the plurality of second processing modules can be mutually standby. That is, if the first processing module fails due to its own failure or due to a problem occurring in a plurality of acquisition units of its lower layer, the business process may also continue through a plurality of second processing modules. Similarly, if a plurality of second processing modules fail due to problems of the second processing modules or due to problems of the acquisition units on the lower layer, the business process can be continued through the first processing module. Therefore, the normal operation of the service can be further ensured.
In this case, in step 604, if the service system receives the notification message reported by the first processing module, the service system may determine that the first processing module is triggered and the terminal is in a specific environment or state. Since the first processing module has the same function as the plurality of second processing modules, the existence of the plurality of second processing modules has no meaning at this time, and thus the service system can remove the second service path, i.e., can log off the registered processing module in the second service path, and does not continue to register other processing modules in the second service path.
If the service system receives the notification message reported by the last processing module of the plurality of second processing modules, the service system may determine that the plurality of second processing modules are all triggered and the terminal is in a specific environment or state. Since the first processing module has the same function as the plurality of second processing modules, the existence of the first processing module has no meaning at this time, and thus the service system can remove the first service path, i.e., can log off the registered processing module in the first service path, and does not continue to register other processing modules in the first service path.
In the embodiment of the application, the service system, the processing module and the acquisition unit are in a hierarchical relationship. The service system can register the processing module, and the processing module can register the acquisition unit. The acquisition unit can acquire the detection information and report the detection information to the processing module, and the processing module reports the notification message to the service system when the detection information reported by the acquisition unit meets the preset condition. Thus, the service system determines that the processing module is triggered, and can also determine the current environment or state of the terminal. In this case, the service system can determine a series of environments or states where the terminal is located through the triggered condition of one or more processing modules in each of the plurality of service paths, and thus, the service system can be applied to many scenes and has high flexibility.
Moreover, because a plurality of service paths are set, the processing module in one service path cannot be triggered due to the fact that the processing module in the service path or the acquisition unit at the lower layer cannot function because of problems, namely, the processing module in the service path fails, and the service path is not communicated, the service system can continue the service flow through other service paths, so that normal operation of the service can be ensured.
The service execution method is described below by taking the service function to be executed by the service system as a function related to a flight, and in this case, the service system may be referred to as a flight system.
FIG. 8 is a schematic diagram of an implementation environment provided by an embodiment of the application. Referring to fig. 8, the implementation environment may include a flight system and a first service path, where the first service path includes a plurality of processing modules and a plurality of collecting units, and the plurality of processing modules may include a short message module, an airport module, and a home-to-home module. The plurality of acquisition units can comprise a short message unit, a time unit, a geographic unit and a wireless network unit.
Specifically, the flight system registers a first processing module, i.e., a short message module, in the first service path. The short message module stores a subscription relationship, and the subscription relationship indicates that the short message module needs to report a notification message when the short message content of the terminal contains the air ticket information. At the moment, the short message module can register a short message unit, and the short message unit can collect the short message content of the terminal and report the short message content to the short message module. The short message module can report a notification message to the flight system when the short message content contains the air ticket information, wherein the notification message can carry the air ticket information, and the air ticket information can comprise departure date, departure airport, arrival airport, departure time (namely boarding time), arrival time, airline company name, flight number, terminal building, ticket number and the like.
And after receiving the notification message reported by the short message module, the flight system determines that the short message module is triggered, namely determines that the terminal needs to arrive at an airport before boarding time. At this point the flight system may register the next processing module in the first traffic path, i.e., the airport module. The airport module stores a subscription relationship, the subscription relationship indicates that the airport module needs to report a notification message when the time of the terminal is within a first time period and the geographic position of the terminal is within a range of the airport geographic position, and the first time period is a time period from the first time before the boarding time to the boarding time. The airport module may then register the time cell and the geographic cell. The time unit can acquire the time of the terminal and report the time to the airport module, and the geographic unit can acquire the geographic position of the terminal and report the geographic position to the airport module. Under normal conditions, the airport module passively receives the reports of the time units and the geographic units. Under special conditions, if the geographic unit does not report detection information for a long time, which indicates that the geographic unit has a problem, the airport module can actively inquire the geographic position of the terminal at the moment. In this case, referring to fig. 9, the airport module may register a screen on/off unit, the screen on/off unit may collect screen on/off status information of the terminal and report the information to the airport module, and the airport module may actively query the geographical location of the terminal when the screen on/off status information indicates that the terminal is in a screen on state. Thereafter, the airport module may report a notification message to the flight system when the terminal is within the first time period and the geographic location of the terminal is within the geographic location range.
And after receiving the notification message reported by the airport module, the flight system determines that the airport module is triggered, namely determines that the terminal arrives at the airport within a first time period. At this point the flight system may register the next processing module in the first traffic path, i.e., to the home away module. The home-to-home module stores a subscription relationship, and the subscription relationship indicates that the home-to-home module needs to report a notification message when a wireless network connected with the terminal is a home wireless network. The home-away module may register the wireless network element at this point. The wireless network unit can collect the name of the wireless network connected with the terminal and report the name to the home leaving module. The home-to-home module may report a notification message to the flight system when the name of the wireless network to which the terminal is connected is a home wireless network name.
After receiving the notification message reported by the home-to-home module, the flight system determines that the home-to-home module is triggered, that is, determines that the terminal arrives at home through the airplane, and the service process is finished, so that the final service function can be executed.
However, in the above process, if the airport module fails to function due to its own or due to a problem occurring in a time unit or a geographic unit of its lower layer, the airport module cannot be triggered, that is, the airport module fails, and the first service path is not available, in this case, the whole set of service flow is not feasible, which may affect the normal operation of the service.
Therefore, in the embodiment of the present application, referring to fig. 10, the implementation environment further includes a second service path, where the second service path includes a plurality of processing modules and a plurality of acquisition units, and the plurality of processing modules may include a short message module, a time module, a geographic module, and a home-to-home module. The plurality of acquisition units can comprise a short message unit, a time unit, a geographic unit and a wireless network unit. In this case, the short message modules in the first service path and the second service path may be the same, and the home-to and home-away modules in the first service path and the second service path may also be the same.
Specifically, the flight system registers a first processing module, i.e., a short message module, in the first service path and the second service path. The short message module stores a subscription relationship, and the subscription relationship indicates that the short message module needs to report a notification message when the short message content of the terminal contains the air ticket information. At the moment, the short message module can register a short message unit, and the short message unit can collect the short message content of the terminal and report the short message content to the short message module. The short message module can report a notification message to the flight system when the short message content contains the air ticket information, wherein the notification message can carry the air ticket information, and the air ticket information can comprise departure date, departure airport, arrival airport, departure time (namely boarding time), arrival time, airline company name, flight number, terminal building, ticket number and the like.
And after receiving the notification message reported by the short message module, the flight system determines that the short message module is triggered, namely determines that the terminal needs to arrive at an airport before boarding time. At this point the flight system may register the next processing module in the first traffic path, i.e., the airport module, while registering the next processing module in the second traffic path, i.e., the time module. The airport module stores a subscription relationship, and the subscription relationship indicates that the airport module needs to report a notification message when the terminal is located within a first time period and the geographic position of the terminal is within a field geographic position range. At which point the airport module can register the time cell and the geographic cell. The time unit can acquire the time of the terminal and report the time to the airport module, and the geographic unit can acquire the geographic position of the terminal and report the geographic position to the airport module. The airport module may report a notification message to the flight system when the terminal is within the first time period and the geographic location of the terminal is within the geographic location range. The time module stores a subscription relationship, the subscription relationship indicates that the time module needs to report the notification message when the terminal is located within a second time period, and the second time period is a time period from a second time after the first time and before the boarding time to the boarding time. At which time the time module may register the time unit. The time unit can collect the time of the terminal and report the time to the time module. The time module may report a notification message to the flight system when the terminal is within a second time period.
Since the first time period and the second time period are both time periods before the boarding time, and the start time of the first time period is earlier than the second time period, if the flight system does not receive the notification message reported by the airport module when receiving the notification message reported by the time module, it indicates that the time module has been triggered, the time of the terminal has reached the second time period, but the airport module has not been triggered, the airport module is likely to have a problem, and at this time, the flight system may cancel the airport module, remove the first traffic path, and continue to register the next processing module, i.e., the geographic module, of the second traffic path. The geographic module stores a subscription relationship, and the subscription relationship indicates that the geographic module needs to report a notification message when the geographic position of the terminal is within the range of the geographic position. At which point the geographic module may register a geographic cell. The geographic unit can collect the geographic position of the terminal and report the geographic position to the geographic module. The geographic module may report a notification message to the flight system when the geographic location of the terminal is within a geographic location range.
And after receiving the notification message reported by the geographic module, the flight system determines that the geographic module is triggered, namely determines that the terminal arrives at the airport within a second time period. At this point the flight system may register the next processing module in the second traffic path, i.e., to the home-away module. The home-to-home module stores a subscription relationship, and the subscription relationship indicates that the home-to-home module needs to report a notification message when a wireless network connected with the terminal is a home wireless network. The departure-to-home module may register the wireless network element at this point. The wireless network unit can collect the name of the wireless network connected with the terminal and report the name to the home leaving module. The home-to-home module may report a notification message to the flight system when the name of the wireless network to which the terminal is connected is a home wireless network name.
After receiving the notification message reported by the home-to-home module, the flight system determines that the home-to-home module is triggered, that is, determines that the terminal arrives at home through the airplane, and the service process is finished, so that the final service function can be executed.
In some cases, to further ensure the normal operation of the business process. Referring to fig. 11, the implementation environment may further include a third traffic path including a sleep module and/or a fourth traffic path including a navigation module.
Wherein for the third traffic path, the flight system registers the sleep module in the third traffic path. The sleep module stores a subscription relationship indicating that the sleep module needs to report a notification message when a user carrying the terminal enters a sleep state. At this time, the sleep module can register a sleep unit, and the sleep unit is used for collecting sleep monitoring information of the user and reporting the sleep monitoring information to the sleep module. The sleep module may report a notification message to the flight system when the sleep monitoring information indicates that the user has entered a sleep state. After receiving the notification message reported by the sleep module, the flight system determines that the sleep module has been triggered, that is, determines that the user has entered a sleep state, and then determines that the user is likely to arrive at home through an airplane, and the service flow is ended, so that the final service function can be executed.
Wherein for the fourth traffic path, the flight system registers the navigation module in the fourth traffic path. The navigation module stores a subscription relationship, and the subscription relationship indicates that the navigation module needs to report a notification message when the destination in the navigation information is a home address. At this time, the navigation module can register a navigation unit, and the navigation unit is used for acquiring the navigation information of the terminal and reporting the navigation information to the navigation module. The navigation module may report a notification message to the flight system when the destination in the navigation message is a home address. After receiving the notification message reported by the navigation module, the flight system determines that the navigation module is triggered, that is, determines that the user has gone home, and then determines that the user is likely to arrive at home through the airplane, and the service process is finished, so that the final service function can be executed.
Fig. 12 is a schematic structural diagram of a service execution apparatus provided in this embodiment, which may be implemented by software, hardware, or a combination of the two as part or all of a computer device, where the computer device may be the terminal shown in fig. 1. Referring to fig. 12, the apparatus includes: a business system 1201, a processing module 1202 and an acquisition unit 1203. The service system 1201 corresponds to a plurality of service paths for implementing the same service function, each of the plurality of service paths includes one or more processing modules 1202, and each of the processing modules 1202 can acquire detection information through one or more acquisition units 1203.
A service system 1201, configured to make i equal to 1, register the ith processing module 1202 of each service path;
the ith processing module 1202 of each service path is used for registering the acquisition unit 1203, and the acquisition unit 1203 is used for acquiring detection information and reporting the acquired detection information to the processing module 1202 of the registration acquisition unit 1203;
the ith processing module 1202 of any service path is configured to report a notification message to the service system 1201 when it is determined that the detection information reported by the registered acquisition unit 1203 meets a preset condition;
the service system 1201 is further configured to, if a notification message reported by the ith processing module 1202 of the one or more service paths is received, execute a service function when the ith processing module 1202 of at least one service path in the one or more service paths is the last processing module 1202; if the ith processing module 1202 of one or more service paths is not the last processing module 1202, let i equal to i +1, and re-execute the step of registering the ith processing module 1202 of each service path and the subsequent steps.
Optionally, the ith processing module 1202 of any service path is further configured to register the specified acquisition unit 1203 when the detection information reported by one registered acquisition unit 1203 is not received for a preset duration, and query the detection information that needs to be acquired by the one acquisition unit 1203 when the specified acquisition unit 1203 reports the specified detection information.
Optionally, the specified acquisition unit 1203 is configured to acquire on-off screen state information of the terminal, and the specified detection information indicates that the terminal is in an on-screen state.
Optionally, the plurality of traffic paths includes a first traffic path and a second traffic path; the first service path includes a first processing module 1202, where the first processing module 1202 is configured to obtain a plurality of detection information, and determine whether each detection information in the plurality of detection information satisfies a corresponding preset condition; the second service path includes a plurality of second processing modules 1202, the plurality of second processing modules 1202 are configured to obtain a plurality of detection information one by one, and each second processing module 1202 is configured to determine whether one obtained detection information satisfies a corresponding preset condition;
the service system 1201 is further configured to remove the second service path when receiving the notification message reported by the first processing module 1202; and when receiving the notification message reported by the last processing module 1202 of the plurality of second processing modules 1202, removing the first service path.
Optionally, the business function is a flight related function;
the first processing module 1202 in the first service path is an airport module, and the acquisition unit 1203 registered by the airport module comprises a time unit and a geographic unit; the time unit is used for collecting the time of the terminal and reporting the time to the airport module, the geographic unit is used for collecting the geographic position of the terminal and reporting the geographic position to the airport module, the airport module is used for reporting a notification message to the service system 1201 when the time of the terminal is within a first time period and the geographic position of the terminal is within the range of the airport geographic position, and the first time period is a time period from the first time before the boarding time to the boarding time;
the plurality of second processing modules 1202 in the second service path sequentially include a time module and a geographic module; the acquisition unit 1203 registered by the time module includes a time unit, the time unit is configured to acquire the time of the terminal and report the time to the time module, the time module is configured to report a notification message to the service system 1201 when the time of the terminal is within a second time period, and the second time period is a time period from a second time after the first time and before the boarding time to the boarding time; the acquisition unit 1203 registered by the geographic module includes a geographic unit, the geographic unit is used for acquiring the geographic position of the terminal and reporting the geographic position to the geographic module, and the geographic module is used for reporting a notification message to the service system 1201 when the geographic position of the terminal is within the range of the geographic position.
Optionally, the processing modules 1202 in the first service path and the second service path further include a short message module, and the short message module is located before the first processing module 1202 and before the plurality of second processing modules 1202; the collecting unit 1203 registered in the short message module includes a short message unit, the short message unit is configured to collect a short message content of the terminal and report the short message content to the short message module, and the short message module is configured to report a notification message carrying air ticket information to the service system 1201 when the short message content contains the air ticket information.
Optionally, the processing modules 1202 in the first traffic path and the second traffic path further include a home-to-home module, and the home-to-home module is located behind the first processing module 1202 and behind the plurality of second processing modules 1202; the acquisition unit 1203 registered in the home-away module includes a wireless network unit, the wireless network unit is configured to acquire a name of a wireless network connected to the terminal and report the name to the home-away module, and the home-away module is configured to report a notification message to the service system 1201 when the name of the wireless network connected to the terminal is a name of a home wireless network.
Optionally, the plurality of service paths further include a third service path and/or a fourth service path, the third service path includes a sleep module, and the fourth service path includes a navigation module; the acquisition unit 1203 registered by the sleep module includes a sleep unit, the sleep unit is configured to acquire sleep monitoring information of a user carrying the terminal and report the sleep monitoring information to the sleep module, and the sleep module is configured to report a notification message to the service system 1201 when the sleep monitoring information indicates that the user has entered a sleep state; the acquisition unit 1203 registered by the navigation module includes a navigation unit, the navigation unit is configured to acquire and report navigation information of the terminal to the navigation module, and the navigation module is configured to report a notification message to the service system 1201 when a destination in the navigation information is a home address.
In this embodiment, the business system 1201, the processing module 1202, and the collecting unit 1203 are in a hierarchical relationship. The business system 1201 may register the processing module 1202, and the processing module 1202 may register the acquisition unit 1203. The acquisition unit 1203 may acquire the detection information and report the detection information to the processing module 1202, and the processing module 1202 reports a notification message to the service system 1201 when the detection information reported by the acquisition unit 1203 meets a preset condition. In this way, the service system 1201 determines that the processing module 1202 is triggered, and can also determine the current environment or state of the terminal. In this case, the service system 1201 can determine a series of environments or states where the terminal is located through the triggered condition of one or more processing modules 1202 in each of the plurality of service paths, so that the service system is applicable to many scenarios and has high flexibility.
Moreover, because a plurality of service paths are set, the processing module 1202 in one service path cannot be triggered due to a problem occurring in the processing module 1202 itself or the acquisition unit 1203 on the lower layer thereof, that is, the processing module 1202 in the service path fails, so that the service path is not communicated, the service system 1201 can continue the service flow through other service paths, thereby ensuring the normal operation of the service.
It should be noted that: in the service execution device provided in the foregoing embodiment, when executing a service, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the service execution device and the service execution method provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments and will not be described herein again.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is not intended to limit the present application to the particular embodiments disclosed, but is intended to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present application.

Claims (10)

1. A service execution method is applied to a terminal, the terminal includes a service system, the service system corresponds to a plurality of service paths for realizing the same service function, each of the plurality of service paths includes one or more processing modules, and the method includes:
making i equal to 1, and the service system registers the ith processing module of each service path;
the ith processing module of each service path registers an acquisition unit, wherein the acquisition unit is used for acquiring detection information and reporting the acquired detection information to the processing module which registers the acquisition unit;
for any service path, if the ith processing module of the service path determines that the detection information reported by the registered acquisition unit meets a preset condition, reporting a notification message to the service system;
if the service system receives a notification message reported by an ith processing module of one or more service paths, the service function is executed under the condition that the ith processing module of at least one service path in the one or more service paths is the last processing module; and under the condition that the ith processing module of the one or more service paths is not the last processing module, enabling i to be i +1, and re-executing the step of registering the ith processing module of each service path and subsequent steps by the service system.
2. The method according to claim 1, wherein if the ith processing module of the service path determines that the detection information reported by the registered acquisition unit satisfies a preset condition, before reporting a notification message to the service system, the method further includes:
if the ith processing module of the service path does not receive the detection information reported by the registered acquisition unit for the preset duration, the ith processing module of the service path registers the appointed acquisition unit, and the ith processing module of the service path inquires the detection information required to be acquired by the acquisition unit when the appointed acquisition unit reports the appointed detection information.
3. The method of claim 2, wherein the designated acquisition unit is configured to acquire on-off screen state information of the terminal, and the designated detection information indicates that the terminal is in an on-screen state.
4. A method according to any of claims 1-3, wherein the plurality of traffic paths comprises a first traffic path and a second traffic path; the first service path comprises a first processing module, wherein the first processing module is used for acquiring a plurality of detection information and judging whether each detection information in the plurality of detection information meets a corresponding preset condition; the second service path comprises a plurality of second processing modules, the plurality of second processing modules are used for acquiring the plurality of detection information one by one, and each second processing module is used for judging whether the acquired detection information meets the corresponding preset condition;
the method further comprises the following steps:
if the service system receives the notification message reported by the first processing module, removing the second service path;
and if the service system receives the notification message reported by the last processing module in the plurality of second processing modules, removing the first service path.
5. The method of claim 4, wherein the business function is a flight related function;
the first processing module in the first service path is an airport module, and a collection unit registered by the airport module comprises a time unit and a geographic unit; the time unit is used for collecting the time of the terminal and reporting the time to the airport module, the geographic unit is used for collecting the geographic position of the terminal and reporting the geographic position to the airport module, the airport module is used for reporting a notification message to the service system when the time of the terminal is within a first time period and the geographic position of the terminal is within a range of an airport geographic position, and the first time period is a time period from a first time before the boarding time to the boarding time;
the plurality of second processing modules in the second service path sequentially comprise a time module and a geographic module; the time module is used for reporting a notification message to the service system when the terminal is located within a second time period, wherein the second time period is a time period from a second time after the first time and before the boarding time to the boarding time; the acquisition unit registered by the geographic module comprises a geographic unit, the geographic unit is used for acquiring the geographic position of the terminal and reporting the geographic position to the geographic module, and the geographic module is used for reporting a notification message to the service system when the geographic position of the terminal is within the geographic position range of the airport.
6. The method of claim 5, wherein the processing modules in the first traffic path and the second traffic path further comprise a text messaging module, the text messaging module located before the first processing module and before the plurality of second processing modules; the acquisition unit registered by the short message module comprises a short message unit, the short message unit is used for acquiring the short message content of the terminal and reporting the short message content to the short message module, and the short message module is used for reporting a notification message carrying the air ticket information to the service system when the short message content contains the air ticket information.
7. The method of claim 5 or 6, wherein the processing modules in the first traffic path and the second traffic path further comprise a go-to-home module located after the first processing module and after the plurality of second processing modules; the system comprises a home-to-home module, a home-to-home module and a home-to-home module, wherein the home-to-home module is used for registering the name of a wireless network connected with a terminal and reporting the name to the home-to-home module, and the home-to-home module is used for reporting a notification message to a service system when the name of the wireless network connected with the terminal is the name of the home wireless network.
8. The method of any of claims 5-7, wherein the plurality of traffic paths further comprises a third traffic path comprising a sleep module and/or a fourth traffic path comprising a navigation module; the acquisition unit registered by the sleep module comprises a sleep unit, the sleep unit is used for acquiring sleep monitoring information of a user carrying the terminal and reporting the sleep monitoring information to the sleep module, and the sleep module is used for reporting a notification message to the service system when the sleep monitoring information indicates that the user enters a sleep state; the acquisition unit registered by the navigation module comprises a navigation unit, the navigation unit is used for acquiring the navigation information of the terminal and reporting the navigation information to the navigation module, and the navigation module is used for reporting a notification message to the service system when the destination in the navigation information is a home address.
9. A service execution device is characterized in that the service execution device comprises a service system, the service system corresponds to a plurality of service paths for realizing the same service function, and each service path in the plurality of service paths comprises one or more processing modules;
the service system is used for enabling i to be equal to 1 and registering the ith processing module of each service path;
the ith processing module of each service path is used for registering an acquisition unit, and the acquisition unit is used for acquiring detection information and reporting the acquired detection information to the processing module registered with the acquisition unit;
the ith processing module of any service path is used for reporting a notification message to the service system when the detection information reported by the registered acquisition unit meets the preset condition;
the service system is further configured to execute the service function when the ith processing module of at least one service path among the one or more service paths is the last processing module if a notification message reported by the ith processing module of the one or more service paths is received; and under the condition that the ith processing module of the one or more service paths is not the last processing module, enabling i to be i +1, and re-executing the step of registering the ith processing module of each service path and the subsequent steps.
10. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-8.
CN202110927099.XA 2021-08-12 2021-08-12 Service execution method, device and storage medium Active CN113805975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110927099.XA CN113805975B (en) 2021-08-12 2021-08-12 Service execution method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110927099.XA CN113805975B (en) 2021-08-12 2021-08-12 Service execution method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113805975A CN113805975A (en) 2021-12-17
CN113805975B true CN113805975B (en) 2022-06-21

Family

ID=78893556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110927099.XA Active CN113805975B (en) 2021-08-12 2021-08-12 Service execution method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113805975B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239037A (en) * 2014-08-25 2014-12-24 中国电子科技集团公司第二十九研究所 Software framework with reconfigurable business function
CN107132852A (en) * 2017-03-31 2017-09-05 西安戴森电子技术有限公司 A kind of unmanned plane supervision cloud platform based on Big Dipper geography fence Differential positioning module
CN108282739A (en) * 2017-01-06 2018-07-13 北京四维图新科技股份有限公司 Geographic information data acquisition method, apparatus and system
CN111654433A (en) * 2015-07-31 2020-09-11 华为技术有限公司 Method, equipment and system for acquiring routing rule
CN112131180A (en) * 2020-09-25 2020-12-25 京东数字科技控股股份有限公司 Data reporting method and device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160147573A (en) * 2015-06-15 2016-12-23 한국전자통신연구원 Method for brokering cloud service using service image store and apparatus using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239037A (en) * 2014-08-25 2014-12-24 中国电子科技集团公司第二十九研究所 Software framework with reconfigurable business function
CN111654433A (en) * 2015-07-31 2020-09-11 华为技术有限公司 Method, equipment and system for acquiring routing rule
CN108282739A (en) * 2017-01-06 2018-07-13 北京四维图新科技股份有限公司 Geographic information data acquisition method, apparatus and system
CN107132852A (en) * 2017-03-31 2017-09-05 西安戴森电子技术有限公司 A kind of unmanned plane supervision cloud platform based on Big Dipper geography fence Differential positioning module
CN112131180A (en) * 2020-09-25 2020-12-25 京东数字科技控股股份有限公司 Data reporting method and device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于分布式地理围栏的管道舆情监控平台的设计与实现";蔡翊等;《测绘技术装备》;20190603;第21卷(第1期);第25,35-37页 *

Also Published As

Publication number Publication date
CN113805975A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN108512695B (en) Method and device for monitoring application blockage
US11537450B2 (en) Method, apparatus, and mobile terminal for associating notification messages
CN113810865B (en) Method and device for carrying out flight reminding based on short message
CN113805988A (en) Method and device for processing card
CN113805975B (en) Service execution method, device and storage medium
CN115097993B (en) Express prompt method and electronic equipment
CN115016705B (en) Express prompt method and electronic equipment
CN114550417B (en) Disaster early warning method, terminal equipment and storage medium
CN115016704B (en) Express prompt method and electronic equipment
CN113900740A (en) Method and device for loading multiple list data
CN116468134A (en) Stroke prompting method and device
CN110083283A (en) Methods, devices and systems for management information
CN115022271B (en) Travel reminding method and electronic equipment
CN110096874A (en) Program page security alarm method, apparatus, computer equipment and storage medium
CN110852717A (en) Travel updating method and intelligent communication terminal
WO2023165225A9 (en) Suspended ball processing method in multi-tasking scenario, and electronic device
CN113806041B (en) Method and device for displaying card
CN115550843B (en) Positioning method and related equipment
CN115086413B (en) Information prompting method and electronic equipment
CN116095230B (en) Application program recommendation method, terminal device and readable storage medium
CN113608610B (en) Interaction control method, electronic equipment and system
CN116233749B (en) Message pushing method, mobile terminal and computer readable storage medium
CN117939008A (en) Card display method and electronic equipment
CN117724780A (en) Information acquisition method
CN115907313A (en) Cargo distribution method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230904

Address after: 201306 building C, No. 888, Huanhu West 2nd Road, Lingang New Area, Pudong New Area, Shanghai

Patentee after: Shanghai Glory Smart Technology Development Co.,Ltd.

Address before: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee before: Honor Device Co.,Ltd.

TR01 Transfer of patent right