Application control method and system, electronic equipment and storage medium

By obtaining the application's network address and switch status values ​​in a distributed system and updating its status in the storage memory, the problems of large network resource occupation and dependence on network links in the prior art are solved, and faster and more efficient application control is achieved.

CN119828522APending Publication Date: 2025-04-15CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411725862.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing distributed development switch scheme obtains the switch status value through HTTP requests or Socket connections, resulting in large network resource usage, extended response time and strong dependence on network links, increasing the probability of failure.

Method used

By obtaining the application's network address and switch status values, there is an address mapping relationship and it is transmitted to the storage memory. When the switch status value is updated, the target application is determined according to the address mapping relationship, and the updated switch status value is transmitted to the target storage memory of the target application, so that it can call the updated switch status value to control the application according to needs.

Benefits of technology

It reduces the occupation of network resources and dependence on the network, improves the response speed of application control, and only needs to update the switch status value through the network when data changes, reducing the frequency of network access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828522A_ABST
    Figure CN119828522A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application control method and system, electronic equipment and a storage medium. The method comprises the following steps: acquiring a network address and a switch state value of an application; transmitting the network address and the switch state value to a storage memory; under the condition that the switch state value is updated, determining a target application according to the address mapping relation; and transmitting the updated on-off state value to a target storage memory corresponding to the target application, so that the target application calls the updated on-off state value from the target storage memory as required to control the target application. According to the method, the switch state value stored in the storage memory of the application only needs to be updated through network access under the condition of data change, occupation of network resources and dependence on the network are greatly reduced, the latest switch state value can be directly read from the storage memory matched with the application when the application needs to be controlled, and the control efficiency is improved. And the response speed of application control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information management systems, and in particular to an application control method, system, electronic equipment and storage medium. Background Art

[0002] In a distributed system, application switches are configured to dynamically control certain functions or behaviors of applications in the system. By using application switches properly, the development team can better manage and control the functions and behaviors of applications in the system, thereby improving the stability, maintainability and user experience of the system. The existing distributed development switch solution is to modify the switch value through the front-end page, and then trigger the addition or modification of database or other middleware related data through the interface layer. In the specific business logic, the application layer can only actively query and obtain the switch status value through the HTTP (Hypertext Transfer Protocol) interface or Socket connection (a communication mechanism that allows two programs to communicate over the network on different computers) to control the application.

[0003] However, obtaining the switch status value through network access methods such as HTTP requests or Socket connections requires network resources, the process link is long, resulting in response delays, and it will have a strong dependence on the network link, increasing the probability of failure. Summary of the invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide an application control method, system, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.

[0005] According to a first aspect of the present invention, there is provided an application control method, which is applied to a switch center, and the method comprises: Acquire a network address and a switch status value of an application, wherein the switch status value is used to control a service status of the application, and an address mapping relationship exists between the application and the network address; Transmitting the network address and the switch status value to a storage memory; In case the switch state value is updated, determining a target application according to the address mapping relationship; The updated switch state value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch state value from the target storage memory to control the target application as needed.

[0006] Optionally, the switch center includes: a registration interface; The obtaining of the network address and switch status value of the application includes: Acquire the application information and network address of the application when registering through the registration interface; A first switch state value is configured according to the application information.

[0007] Optionally, the switch center further includes a data update interface; When the switch state value is updated, determining the target application according to the address mapping relationship includes: In case the switch state value is updated, determining a target network address; Triggering a push strategy through the data update interface; The target application corresponding to the target network address is matched in the mapping relationship according to the push policy and the target network address.

[0008] Optionally, matching the target application corresponding to the target network address according to the mapping relationship by using the push strategy and the target network address includes: Determine a push range according to the push strategy, the push range including: a primary push range and a secondary push range; When the push range is the first-level push range, all applications within the first-level push range are taken as the target applications; When the push range is the secondary push range, an application matching the target network address within the secondary push range is used as the target application according to the mapping relationship.

[0009] Optionally, transmitting the updated switch state value to a target storage memory corresponding to the target application includes: In case the switch state value is updated, determining a second switch state value, the second switch state value comprising the updated switch state value; Sending a push request to the target application; If the target application receives the push request, the second switch state value is transmitted to the target storage memory matching the target application, and the first switch state value in the target storage memory is updated to the second switch state value.

[0010] According to a second aspect of the present invention, there is provided an application control method, which is applied to an application layer, and the method comprises: Obtaining a switch status value and a network address corresponding to an application, wherein the switch status value is used to control a service status of the application, and an address mapping relationship exists between the application and the network address; Storing the switch state value and the network address in a storage memory; When the application needs to be controlled, the switch state value is read from the storage memory matching the application.

[0011] Optionally, storing the switch state value and the network address in a storage memory includes: When the switch state value changes, determining a target network address and a second switch state value, the second switch state value comprising an updated switch state value; Matching the target application and the target storage memory corresponding to the target network address in the mapping relationship according to the target network address; Updating the first switch state value in the target storage memory to the second switch state value; When the application needs to be controlled, reading the switch state value from the target storage memory matching the application includes: When the target application needs to be controlled, the second switch state value is read from the target storage memory matching the target application.

[0012] According to a third aspect of the present invention, there is provided an application control system, the application control system comprising: a switch center, an application layer, a storage layer and a monitoring layer; The switch center is used to obtain the network address and switch status value of the application, the switch status value is used to control the service status of the application, and there is an address mapping relationship between the application and the network address; the network address and the switch status value are transmitted to the storage memory; when the switch status value is updated, the target application is determined according to the address mapping relationship; the updated switch status value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application; The application layer is used to obtain a switch status value and a network address corresponding to an application, wherein the switch status value is used to control the service status of the application, and an address mapping relationship exists between the application and the network address; the switch status value and the network address are stored in a storage memory; when the application needs to be controlled, the switch status value is read from the storage memory matching the application; The storage layer is used to store the network address and the switch status value, and return the data change result to the switch center when the data change occurs; The monitoring layer is used to monitor the data status of the storage layer, and if the data status meets the preset conditions, send a data change notification to the switch center.

[0013] According to a fourth aspect of the present invention, there is provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to implement the steps of the above-mentioned application control method when executing the program stored in the memory.

[0014] According to a fifth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and the computer program implements the steps of the above-mentioned application control method when executed by a processor.

[0015] The embodiments of the present invention include the following advantages: In an embodiment of the present invention, by obtaining the network address and switch status value of the application, an address mapping relationship exists between the application and the network address; the network address and the switch status value are transmitted to the storage memory; when the switch status value is updated, the target application is determined according to the address mapping relationship; the updated switch status value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application, and by monitoring the update of the switch status value, it is only necessary to update the switch status value stored in the storage memory of the application through network access when the data changes, which greatly reduces the occupation of network resources and dependence on the network, and when it is necessary to control the application, the latest switch status value can be directly read from the storage memory matching the application, thereby improving the response speed of application control.

[0016] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] Figure 1 is a flow chart of the steps of a conventional application control method provided by an embodiment of the present invention; Figure 2 is a flow chart of the switch center steps of an application control method embodiment of the present invention; Figure 3is a flowchart of application layer steps of an application control method embodiment of the present invention; Figure 4 is a flowchart of the steps of an application control method embodiment provided by an embodiment of the present invention; Figure 5 is a structural block diagram of an application control system embodiment of the present invention; Figure 6 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0020] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0021] In conjunction with the accompanying drawings, an application control method and system provided by an embodiment of the present invention are described in detail through specific embodiments and application scenarios.

[0022] In a distributed system, application switches are configured to dynamically control certain functions or behaviors of applications in the system. By using application switches properly, the development team can better manage and control the functions and behaviors of applications in the system, thereby improving system stability, maintainability, and user experience.

[0023] Reference Figure 1 , shows a flow chart of the steps of a conventional application control method of the present invention, which may specifically include the following steps: The existing distributed application control method queries the switch status value at the application layer through an active pull mode.

[0024] Specifically, when a user adds / modifies / deletes a switch status value through the front-end page of the switch center, the addition / modification / deletion of the database or other middleware-related data in the storage layer will be triggered through the interface of the switch center.

[0025] When the application needs to control the application in the specific business logic, the application layer obtains the switch status in the storage layer by querying the business switch.

[0026] In actual applications, the switch status value in the storage layer is queried through the HTTP interface or Socket long connection, and the storage layer returns the queried switch status value to the application layer.

[0027] However, the traditional message push method is a pull mode. Every time the switch status value needs to be obtained, it is necessary to obtain the value through network access methods such as HTTP requests or Socket connections. On the one hand, it takes up network resources and the long process link causes response delays. On the other hand, the strong dependence on network links and middleware also increases the probability of failure. In addition, it is impossible to achieve independent control. For example, if distributed applications need to test part of the traffic in the production environment, the distributed switch in pull mode cannot accurately control the switch value of each machine because it does not have the application layer status.

[0028] Reference Figure 2 , shows a flow chart of the switch center steps of an application control method embodiment of the present invention, which may specifically include the following steps: Step 201, obtaining a network address and a switch status value of an application, wherein the switch status value is used to control a service status of the application, and an address mapping relationship exists between the application and the network address; The switch status value refers to the current value or state of the application switch. This value can be a Boolean value (True / False), an enumeration value (such as "ON" / "OFF"), or other types of data. The switch status value reflects the current state of the application switch, that is, whether a function or module is enabled.

[0029] In the embodiment of the present invention, the switch center records the IP address (Internet Protocol Address) of the application and the configured switch state value when the application is registered, and determines the IP address mapping relationship according to the application and the IP address.

[0030] Step 202, transmitting the network address and the switch status value to a storage memory; After recording the network address and switch status value of the application, the network address and switch status value are returned to the application layer as response information, so that the application layer caches the network address and switch status value to the storage memory.

[0031] In this embodiment, the network address and switch status value can be cached in the JVM (Java Virtual Machine) memory. By caching the configuration information (including the network address and switch status value) in the JVM memory, the reading speed of the configuration information can be improved and the frequent access to the persistent storage can be reduced, so that the application can flexibly manage and adjust the enabled or disabled state of the functional module, thereby improving the performance and maintainability of the application.

[0032] Step 203, when the switch state value is updated, determining a target application according to the address mapping relationship; Specifically, a monitoring layer can be set up to monitor the data log in the storage layer. When data writing or data updating operations are detected in the data log, that is, when the switch status value is updated, a data change notification will be sent to the switch center. When the switch center receives the data change notification, it determines the updated data content based on the data change results returned by the storage layer, which may include the updated switch status value, the network address corresponding to the updated switch status value, and the updated application.

[0033] After obtaining the updated data content, the target application to which the updated switch status value needs to be pushed can be determined according to the address mapping relationship.

[0034] In the embodiment of the present invention, through the registration and monitoring mode and the registration of the application to the switch center, the switch center can accurately record the configuration information of all applications in the application layer, and then push differentiated switch status values ​​to different applications according to the IP address of the application to achieve precise control of the application.

[0035] Step 204: Transmit the updated switch state value to the target storage memory corresponding to the target application, so that the target application calls the updated switch state value from the target storage memory to control the target application as needed.

[0036] In this embodiment, after determining the target application, the updated switch status value is transmitted to the target storage memory corresponding to the target application. The target storage memory can be the target JVM memory that stores the target application network address and the original switch status value. The switch status value stored in the application's storage memory only needs to be updated through network access when the data changes, which greatly reduces the occupation of network resources and dependence on the network.

[0037] When the target application needs to be controlled to control the enabled state of a certain function or module, the updated switch state value control can be directly called from the target JVM memory to control the target application, thereby improving the response speed of the application control.

[0038] An application control method provided by an embodiment of the present invention obtains a network address and a switch status value of an application, where an address mapping relationship exists between the application and the network address; the network address and the switch status value are transmitted to a storage memory; when the switch status value is updated, a target application is determined according to the address mapping relationship; the updated switch status value is transmitted to a target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application, and by monitoring the update of the switch status value, it is only necessary to update the switch status value stored in the storage memory of the application through network access when the data changes, thereby greatly reducing the occupation of network resources and the dependence on the network, and when it is necessary to control the application, the latest switch status value can be directly read from the storage memory matching the application, thereby improving the response speed of application control.

[0039] In one embodiment of the present invention, the switch center includes: a registration interface; The obtaining of the network address and switch status value of the application includes: Acquire the application information and network address of the application when registering through the registration interface; A first switch state value is configured according to the application information.

[0040] In actual applications, the switch center includes a registration interface, which is used to register an application. When an application is registered through the registration interface, the registration interface obtains the application information and network address when the application is registered. The application information includes the application type and the scenario type. The switch center obtains the first switch state value of the registered application according to the application type and the scenario type configuration, wherein the first switch state value represents the initial switch state value configured according to the registration information.

[0041] By registering the application through the registration interface of the switch center and recording the application's IP address in the process, and configuring the initial switch value according to the application type and scenario type, dynamic, flexible and efficient configuration management can be achieved, ensuring that the application has the correct initial configuration when it starts, thereby improving the system's real-time response capability. By recording the IP address, differentiated switch status values ​​can be pushed to different applications based on the IP address information.

[0042] In one embodiment of the present invention, the switch center further comprises a data update interface; When the switch state value is updated, determining the target application according to the address mapping relationship includes: In case the switch state value is updated, determining a target network address; Triggering a push strategy through the data update interface; The target application corresponding to the target network address is matched in the mapping relationship according to the push policy and the target network address.

[0043] In actual applications, when the monitoring layer monitors data writing or data updating operations in the data log through the log monitoring tool, it will send a data change notification to the switch center, and the storage layer will return the data change result to the switch center to determine the updated data content. If the switch center receives the data change notification and the corresponding data change notification, it means that the switch status value has been updated. At this time, the changed switch status value and the target IP address corresponding to the changed switch status value can be determined according to the data change notification and the data change result.

[0044] When a data change notification is received, the data update interface of the switch center is called to trigger a data push task, wherein the data push task includes: obtaining a target application that needs to update the switch state value based on the target IP address in the push strategy.

[0045] In an embodiment of the present invention, the target IP address whose switch status value needs to be updated is obtained by judging the registration monitoring mode, and then the target application whose switch status value needs to be updated is matched in the push strategy according to the target IP address, and differentiated switch status values ​​are pushed to different applications to achieve precise control of the application.

[0046] In an embodiment of the present invention, matching the target application corresponding to the target network address according to the mapping relationship through the push strategy and the target network address includes: Determine a push range according to the push strategy, the push range including: a primary push range and a secondary push range; When the push range is the first-level push range, all applications within the first-level push range are taken as the target applications; When the push range is the secondary push range, an application matching the target network address within the secondary push range is used as the target application according to the mapping relationship.

[0047] Specifically, the push range can be determined according to the push strategy, and the push range can be divided into a primary push range and a secondary push range. The primary push range indicates that all applications within the range are target applications; the secondary push range indicates that the specified target application needs to be matched according to the target IP address within the push range. By setting different push ranges, differentiated switch status values ​​can be pushed to different applications to achieve precise control of the applications.

[0048] In actual applications, multiple systems in production environments and grayscale environments can be controlled through switch status values. The target application can be a node in the application. The first-level push range can be divided into a cluster-level push range and an application-level push range, and the second-level push range can be divided into a node-level push range.

[0049] When pushing a scope at the cluster level, after the switch status value is modified, the updated switch status value can be pushed to all nodes of all applications in the specified cluster; When pushing the scope at the application level, after the switch status value is modified, the updated switch status value can be pushed to all nodes of the specified application in the specified cluster; When pushing a scope at the node level, after the switch status value is modified, the updated switch status value can be pushed to the specified cluster, specified application, and specified one or more IP nodes.

[0050] By sharing the same switch center for the production environment and the grayscale environment, the switch status value control within the three-level push range of the cluster, application, and node can be achieved, thereby controlling the functions of all / specified IP nodes within the application.

[0051] In an embodiment of the present invention, the step of transmitting the updated switch state value to a target storage memory corresponding to the target application includes: In case the switch state value is updated, determining a second switch state value, the second switch state value comprising the updated switch state value; Sending a push request to the target application; If the target application receives the push request, the second switch state value is transmitted to the target storage memory matching the target application, and the first switch state value in the target storage memory is updated to the second switch state value.

[0052] In an embodiment of the present invention, after determining the target application to be pushed through the target IP address, a push request is sent to the target application. When the target application receives the push request, the updated switch status value is transmitted as the second switch status value to the target JVM memory matching the target application, replacing the first switch status value in the target JVM memory, so that the message push mode is a push mode, that is, it is only necessary to update the switch status value stored in the storage memory of the application through network access when the data changes, which greatly reduces the occupation of network resources and dependence on the network.

[0053] Reference Figure 3 , shows an application layer step flow chart of an application control method embodiment of the present invention, which may specifically include the following steps: Step 301, obtaining a switch state value and a network address corresponding to an application, wherein the switch state value is used to control a service state of the application, and an address mapping relationship exists between the application and the network address; After receiving the response information from the switch center, the switch status value and IP address corresponding to the application are obtained according to the response information. The switch status value is used to control the service status of the application. This value can be a Boolean value (True / False), an enumeration value (such as "ON" / "OFF") or other types of data. The switch status value reflects the current state of the application switch, that is, whether a certain function or module is enabled, and there is an address mapping relationship between the application and the IP address. The corresponding application and the switch status value of the application can be determined according to the IP address.

[0054] Step 302, storing the switch state value and the network address in a storage memory; After obtaining the switch status value and IP address corresponding to the application, the switch status value and IP address are stored in the JVM (Java Virtual Machine) memory. By caching the IP address and switch status value in the JVM memory, the reading speed of configuration information can be improved and the frequent access to persistent storage can be reduced, so that the application can flexibly manage and adjust the enabled or disabled status of functional modules, thereby improving the performance and maintainability of the application.

[0055] Step 303: when the application needs to be controlled, read the switch state value from the storage memory matching the application.

[0056] Since the switch status value is stored in the JVM memory of the application layer, when the application needs to be controlled, the switch status value can be read from the JVM memory that matches the application, so that it can be cached to the JVM memory through the push mode during startup or data change. When the application needs to read the switch status value, it can realize the reading between memory and memory, achieving microsecond response.

[0057] In one embodiment of the present invention, storing the switch state value and the network address in a storage memory includes: When the switch state value changes, determining a target network address and a second switch state value, the second switch state value comprising an updated switch state value; Matching the target application and the target storage memory corresponding to the target network address in the mapping relationship according to the target network address; Updating the first switch state value in the target storage memory to the second switch state value; When the application needs to be controlled, reading the switch state value from the target storage memory matching the application includes: When the target application needs to be controlled, the second switch state value is read from the target storage memory matching the target application.

[0058] When the switch status value changes, the switch center will send a push request to the application layer. After the application layer receives the push request, the target IP address where the switch status value changes and the updated switch status value can be obtained according to the push request, and the updated switch status value is stored as the second switch status value in the target JVM memory determined according to the mapping relationship of the target IP address, and the first switch status value in the target JVM memory (that is, the initial switch status value or the switch status value before the update) is updated to the second switch status value, so that the message push mode is the push mode, that is, only when the data changes, it is necessary to update the switch status value stored in the storage memory of the application through network access, which greatly reduces the occupation of network resources and dependence on the network, and when the application needs to read the switch status value, it can realize the reading of the latest switch status value between memory and memory.

[0059] Reference Figure 4 , shows a flowchart of the steps of an application control method embodiment provided by an embodiment of the present invention, which may specifically include the following steps: Register the application through the registration interface of the switch center, record the IP address of the application in the process, and configure the initial switch value, that is, the first switch state value, according to the application type and scenario type. Then, return the first switch state value and IP address to the application layer as response information; After obtaining the response information, the application layer stores the first switch state value and IP address in the response information into the JVM memory, and reflects them in the storage layer in the form of data logs; The monitoring layer monitors whether there are users adding / modifying / deleting switch status values ​​through the switch center (that is, users changing switch status values ​​through front-end page operations) or executing SQL to trigger data changes in the storage layer, that is, monitoring whether there are data write or data update operations. If data write or data update operations are detected, the data change notification is sent to the switch center, and the storage layer returns the corresponding data change results to the switch center; When the switch center receives the data change notification and the corresponding data change result, it calls the data update interface of the switch center to trigger the data push task and sends a push request to the application layer, wherein the data push task includes: matching the target application that needs to update the switch status value in the push strategy based on the target IP address; After the application layer receives the push request, the target IP address and the second switch state value whose switch state value is changed are obtained according to the push request, and then the first switch state value in the target JVM memory matching the target IP address in the application layer is updated to the second switch state value; After the switch status value is updated, the update result is returned to the switch center, and the switch center records the relevant change results.

[0060] Optionally, the monitoring layer can also determine whether there is a problem with the application service based on the heartbeat detection mechanism. When the application fails the heartbeat detection for a long time, the service is downgraded.

[0061] In an embodiment of the present invention, the network address and switch status value of the application are obtained; the network address and the switch status value are transmitted to the storage memory; when the switch status value is updated, the target application is determined according to the address mapping relationship; the updated switch status value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application, and by monitoring the update of the switch status value, it is only necessary to update the switch status value stored in the storage memory of the application through network access when the data changes, which greatly reduces the occupation of network resources and the dependence on the network, and when it is necessary to control the application, the latest switch status value can be directly read from the storage memory matching the application, thereby improving the response speed of application control.

[0062] Reference Figure 5 , shows a structural block diagram of an application control system embodiment of the present application, which may specifically include the following modules: The switch center 501 is used to obtain the network address and switch status value of the application, the switch status value is used to control the service status of the application, and there is an address mapping relationship between the application and the network address; the network address and the switch status value are transmitted to the storage memory; when the switch status value is updated, the target application is determined according to the address mapping relationship; the updated switch status value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application; The application layer 502 is used to obtain a switch state value and a network address corresponding to an application, wherein the switch state value is used to control the service state of the application, and an address mapping relationship exists between the application and the network address; the switch state value and the network address are stored in a storage memory; when the application needs to be controlled, the switch state value is read from the storage memory matching the application; The storage layer 503 is used to store the network address and the switch status value, and return the data change result to the switch center when the data change occurs; The monitoring layer 504 is used to monitor the data status of the storage layer, and if the data status meets the preset conditions, send a data change notification to the switch center.

[0063] In an embodiment of the present application, the application control system provided by the embodiment of the present application obtains the network address and switch status value of the application; transmits the network address and switch status value to the storage memory; when the switch status value is updated, determines the target application according to the address mapping relationship; transmits the updated switch status value to the target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application, and by monitoring the update of the switch status value, it is only necessary to update the switch status value stored in the storage memory of the application through network access when the data changes, which greatly reduces the occupation of network resources and dependence on the network, and when the application needs to be controlled, the latest switch status value can be directly read from the storage memory matching the application, thereby improving the response speed of application control.

[0064] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0065] In addition, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned application control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0066] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned application control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0067] An embodiment of the present invention also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned application control method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0068] like Figure 6 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 701 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the application control method described in the above embodiment.

[0069] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0071] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0072] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0073] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0074] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0075] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0076] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0077] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., various media that can store program codes.

[0078] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An application control method, characterized in that: Applied to a switch center, the method comprises: Acquire a network address and a switch status value of an application, wherein the switch status value is used to control a service status of the application, and an address mapping relationship exists between the application and the network address; Transmitting the network address and the switch status value to a storage memory; In case the switch state value is updated, determining a target application according to the address mapping relationship; The updated switch state value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch state value from the target storage memory to control the target application as needed.

2. The method according to claim 1, characterized in that The switch center includes: a registration interface; The obtaining of the network address and switch status value of the application includes: Acquire the application information and network address of the application when registering through the registration interface; A first switch state value is configured according to the application information.

3. The method according to claim 1, characterized in that: The switch center also includes a data update interface; When the switch state value is updated, determining the target application according to the address mapping relationship includes: In case the switch state value is updated, determining a target network address; Triggering a push strategy through the data update interface; The target application corresponding to the target network address is matched in the mapping relationship according to the push policy and the target network address.

4. The method according to claim 3, characterized in that The matching the target application corresponding to the target network address according to the mapping relationship by using the push strategy and the target network address includes: Determine a push range according to the push strategy, the push range including: a primary push range and a secondary push range; When the push range is the first-level push range, all applications within the first-level push range are taken as the target applications; When the push range is the secondary push range, an application matching the target network address within the secondary push range is used as the target application according to the mapping relationship.

5. The method according to claim 4, characterized in that The step of transmitting the updated switch state value to a target storage memory corresponding to the target application includes: In case the switch state value is updated, determining a second switch state value, the second switch state value comprising the updated switch state value; Sending a push request to the target application; If the target application receives the push request, the second switch state value is transmitted to the target storage memory matching the target application, and the first switch state value in the target storage memory is updated to the second switch state value.

6. An application control method, characterized in that: Applied to the application layer, the method comprises: Obtaining a switch status value and a network address corresponding to an application, wherein the switch status value is used to control a service status of the application, and an address mapping relationship exists between the application and the network address; Storing the switch state value and the network address in a storage memory; When the application needs to be controlled, the switch state value is read from the storage memory matching the application.

7. The method according to claim 6, characterized in that The step of storing the switch state value and the network address in a storage memory includes: When the switch state value changes, determining a target network address and a second switch state value, the second switch state value comprising an updated switch state value; Matching the target application and the target storage memory corresponding to the target network address in the mapping relationship according to the target network address; Updating the first switch state value in the target storage memory to the second switch state value; When the application needs to be controlled, reading the switch state value from the target storage memory matching the application includes: When the target application needs to be controlled, the second switch state value is read from the target storage memory matching the target application.

8. An application control system, characterized in that: The application control system includes: a switch center, an application layer, a storage layer and a monitoring layer; The switch center is used to obtain the network address and switch status value of the application, the switch status value is used to control the service status of the application, and there is an address mapping relationship between the application and the network address; the network address and the switch status value are transmitted to the storage memory; when the switch status value is updated, the target application is determined according to the address mapping relationship; the updated switch status value is transmitted to the target storage memory corresponding to the target application, so that the target application calls the updated switch status value from the target storage memory as needed to control the target application; The application layer is used to obtain a switch status value and a network address corresponding to an application, wherein the switch status value is used to control the service status of the application, and an address mapping relationship exists between the application and the network address; the switch status value and the network address are stored in a storage memory; when the application needs to be controlled, the switch status value is read from the storage memory matching the application; The storage layer is used to store the network address and the switch status value, and return the data change result to the switch center when the data change occurs; The monitoring layer is used to monitor the data status of the storage layer, and if the data status meets the preset conditions, send a data change notification to the switch center.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.