Operation state management method and device, electronic equipment and storage medium

By identifying the main components in the cloud-native ecosystem and selectively acquiring data, and then processing it with specific algorithms and pushing it in sequence, the problem of Kubernetes data flow consuming computing resources is solved, and the data processing efficiency and the display effect of the middle-end components are improved.

CN120610795APending Publication Date: 2025-09-09湖南亚信软件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510708717.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

In the cloud-native ecosystem, Kubernetes Pod data stream monitoring consumes a large amount of computing resources, affecting the display effect of the middleware components.

Method used

The main component is determined from multiple components through competition. The main component selectively obtains full and incremental data, processes them using a specific algorithm, and then puts them into a queue and pushes the data in the order in which it is pushed.

Benefits of technology

It reduces the computing resource requirements for monitoring Kubernetes data streams and improves the data processing efficiency and display effects of the middle-end components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120610795A_ABST
    Figure CN120610795A_ABST
Patent Text Reader

Abstract

The invention discloses a running state management method and device, electronic equipment and a storage medium, and the method and device are applied to the electronic equipment, and specifically comprise the steps: determining a main component from a plurality of components based on a competition mode when the plurality of components start to run; selectively acquiring total data and incremental data based on the main component; processing the total data and the incremental data by adopting a specific algorithm, and putting the obtained processed data into a specified queue; and pushing the processed data to the target working module according to the pushing sequence, so that the target working module displays the processed data. According to the scheme, it is only determined that the main component obtains the total data initially, and only incremental data is obtained subsequently, so that the amount of data needing to be processed is small, and computing resources needed for monitoring the Kubernetes data flow can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud native technology, and more specifically, to an application running status management method, device, electronic device and storage medium. Background Art

[0002] In the cloud-native ecosystem, Kubernetes (k8s) pods are widely used for their data flows during runtime. A pod is a collection of containers that can run on a host. This resource is created and scheduled to the host by the client. Once the corresponding business system is started, it needs to obtain data information about the pod containers in real time. Specifically, this is done by obtaining full and incremental updates and pushing them to the client in a timely manner, allowing users to have real-time access to full and incremental data.

[0003] In the telecom billing field, the middleware component plays a crucial role, displaying status information for all Pod containers to users, including but not limited to operational status, startup time, health status, and resource usage. However, since the middleware component monitors the Kubernetes data stream in real time, the data volume is enormous, wasting significant computing resources and affecting the display quality of the middleware component. Summary of the Invention

[0004] In view of this, the present application provides an operation status management method, device, electronic device and storage medium for saving the computing resources required for monitoring Kubernetes data streams.

[0005] In order to achieve the above objectives, the following solutions are proposed:

[0006] A method for managing an operating state is applied to an electronic device, and the method comprises the following steps:

[0007] When the plurality of components begin to run, determining a master component from the plurality of components based on a competition method;

[0008] selectively acquiring full data and incremental data based on the main component;

[0009] Processing the full data and the incremental data using a specific algorithm, and placing the processed data into a designated queue;

[0010] The processed data is pushed to the target working module in a pushing order, so that the target working module displays the processed data.

[0011] Optionally, when the multiple components begin to run, determining the main component from the multiple components based on a competition method includes the steps of:

[0012] Controlling the multiple components to acquire locks in a competitive manner;

[0013] Determine the component that successfully acquires the lock as the main component, and control the main component to renew the lock once every first time period;

[0014] Simultaneously controlling the other components except the main component to attempt to acquire the lock every second time period;

[0015] The component that obtains the lock is determined as the main component.

[0016] Optionally, the first duration is greater than the second duration.

[0017] Optionally, the acquiring of full data and incremental data based on the main component includes the following steps:

[0018] The main component only obtains the full amount of data through the API interface for the first time;

[0019] After obtaining the full data, the Pod is monitored through a long connection and the incremental data is obtained.

[0020] Optionally, the acquiring of full data and incremental data based on the main component further includes the following steps:

[0021] The full data and / or the incremental data are filtered to remove junk data and useless data.

[0022] Optionally, the step of pushing the processed data to the target working module in a push order includes the following steps:

[0023] Determine the push order according to the version number of the Pod;

[0024] The push operation is performed according to the push order.

[0025] Optionally, the following steps may also be included:

[0026] When the master component goes down or the Kubernetes connection is disconnected, the connection is restored and the data lost during the disconnection is retrieved.

[0027] Optionally, the following steps are also included:

[0028] Configure the lock storage tool, business middle platform address, HTTP connection number of each component to Kubernetes and reconnection time after disconnection, and add a message queue client thread in the business process.

[0029] A running status management device, applied to an electronic device, comprising:

[0030] a main component determination module configured to determine a main component from the plurality of components based on a competition method when the plurality of components begin to operate;

[0031] A data acquisition module is configured to selectively acquire full data and incremental data based on the main component;

[0032] a data processing module configured to process the full data and the incremental data using a specific algorithm, and to place the processed data into a designated queue;

[0033] The data push module is configured to push the processed data to the target working module in a push order, so that the target working module displays the processed data.

[0034] Optionally, also include:

[0035] The disconnection and reconnection module is configured to restore the connection when the main component goes down or the Kubernetes connection is disconnected, and to reacquire the data lost during the disconnection.

[0036] Optionally, also include:

[0037] The component configuration module is configured to configure the lock storage tool, business middle platform address, the number of HTTP connections for the component to connect to Kubernetes, and the reconnection time after disconnection for each component, and add a message queue client thread in the business process.

[0038] An electronic device comprising at least one processor and a memory connected to the processor, wherein:

[0039] The memory is used to store computer programs or instructions;

[0040] The processor is used to execute the computer program or instruction to enable the electronic device to implement the operating status management method as described above.

[0041] A computer-readable storage medium is applied to an electronic device, wherein the storage medium carries one or more computer programs, and the one or more computer programs can be executed by the electronic device, thereby enabling the electronic device to implement the operation status management method as described above.

[0042] It can be seen from the above technical solutions that the present application discloses a method, device, electronic device and storage medium for running state management. The method and device are applied to electronic devices. Specifically, when multiple components start running, the main component is determined from multiple components based on a competitive manner; full data and incremental data are selectively obtained based on the main component; full data and incremental data are processed using a specific algorithm, and the processed data are placed in a designated queue; the processed data is pushed to the target working module in the order of push, so that the target working module displays the processed data. This solution only obtains full data when the main component is initially determined, and only obtains incremental data subsequently. In this way, the amount of data to be processed will be less, thereby saving the computing resources required for monitoring the Kubernetes data stream. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

[0044] Figure 1 This is a flow chart of a method for managing an operating state according to an embodiment of the present application;

[0045] Figure 2 This is a flowchart of another operating status management method according to an embodiment of the present application;

[0046] Figure 3 A block diagram of an operating status management device according to an embodiment of the present application;

[0047] Figure 4 A block diagram of another operating status management method according to an embodiment of the present application;

[0048] Figure 5 A block diagram of another operating status management method according to an embodiment of the present application;

[0049] Figure 6 This is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0051] Benshen creatively found a way to recover data after disconnection through memory management to maintain data consistency, and achieved high availability of components through a lock-based approach. It also has multi-coroutine working capabilities when the application is running, which means that even in the face of a large amount of concurrent traffic, the system can quickly process and push data to the middle platform through multi-coroutines.

[0052] This application proposes a method for autonomously achieving master-slave switching through a locking mechanism. The unique feature of the method is that it can achieve seamless switching, and when the main component fails, the backup component can immediately switch to the main working component.

[0053] In addition, this application also provides a data security protection mechanism based on memory management. When the connection to the Kubernetes watch is disconnected and reconnected, we can rely on the data in the memory manager and the real-time data of Kubernetes to quickly restore and back up data through the resourceVersion version number, effectively avoiding data loss or inconsistency.

[0054] This application also uses a memory manager to fully store the data observed by Kubernetes after connection, and can filter out junk and useless data, thus ensuring the health and stability of the data. This data is not only used for data push, but also for rapid data recovery, ensuring the reliability and stability of the entire system.

[0055] This application provides a multi-coroutine working mechanism. Even when a large amount of traffic is flowing into Kubernetes, we can process data in batches in parallel through multiple coroutines, and at the same time push data to the middle platform in the order of version numbers, ensuring the efficiency of data processing and the order of push. Based on the above content, this application specifically proposes the following specific embodiments.

[0056] Figure 1 This is a flowchart of an operating status management method according to an embodiment of the present application.

[0057] like Figure 1 As shown, the operation status management method provided in this embodiment is applied to an electronic device, which is a computer, server or cloud platform with information processing and data computing capabilities and networking capabilities. The operation status management method specifically includes the following steps:

[0058] S1. Determine a main component from multiple components based on a competition method.

[0059] When multiple components start running, this application uses a competitive approach to determine the master component from among them. That is, multiple components are allowed to determine the master component by grabbing the lock. Here, the component that grabs the lock is described as the master component, and the components that do not grab the lock are called other components. The specific process is as follows:

[0060] First, multiple application components that enter the running state are controlled to obtain locks through competition, that is, they obtain locks equally without distinguishing between master and slave and priority.

[0061] Once a component acquires the lock, it is designated as the master component, and the others are designated as slave components. Furthermore, the master component is locked once every certain period of time to confirm its master status. For ease of description, this interval is referred to as the first duration.

[0062] At the same time, during the operation of multiple components, other components are controlled to grab the lock once every second time period to ensure that in the event of a main component downtime or disconnection, another component can be upgraded to the main component in time. In this application, the first time period is greater than the second time period. For example, the first time period can be selected as 30 seconds, and the second time period can be selected as 10 seconds, 15 seconds, 20 seconds, etc.

[0063] When the master component crashes or is disconnected, and another component obtains the lock through a competitive mechanism, the other component that obtains the lock will be upgraded to the master component, thus ensuring that the system always has a master component.

[0064] S2. Selectively obtain full data and incremental data based on the main component.

[0065] That is, first, the main component determined by the control is used to obtain the data of LIST&WATCH Kubernetes through the API. The data obtained is the full data of the Pod listed, and the full data is stored in the local memory manager; then, in the subsequent time, the data of the incremental update of the Pod, that is, the incremental data, is monitored and received in real time through a long connection. In addition, in a specific embodiment of the present application, the received data is also filtered to exclude junk data and useless data. The filtered data here include full data and incremental data, or one of the full data and incremental data.

[0066] S3. Process the full data and incremental data.

[0067] Use a specific algorithm to process the full and incremental data and place the processed data into a specified queue. The specific algorithm here can be a hash algorithm or a modulo distribution scheduling algorithm.

[0068] S4. Push the processed data to the target working module in the push order.

[0069] After processing the full data and incremental data to obtain the processed data, the processed data is pushed to the target working module in a predetermined push order so that the target working module displays the processed data to the user. When the technical solution of the present application is applied to the field of telecommunications billing, the target working module can be the middle platform component, so that the middle platform component can efficiently display Pod data.

[0070] The push order can be determined according to the version number of the Pod; after the push order is determined, the processed data can be pushed to the target working module according to the push order.

[0071] As can be seen from the above technical solution, this embodiment provides a method for operating status management, which is applied to electronic devices. Specifically, when multiple components start running, a main component is determined from multiple components based on a competitive manner; full data and incremental data are selectively obtained based on the main component; a specific algorithm is used to process the full data and incremental data, and the processed data is placed in a designated queue; the processed data is pushed to the target working module in the order of push, so that the target working module displays the processed data. This solution only obtains full data when the main component is initially determined, and only obtains incremental data subsequently. In this way, the amount of data to be processed will be less, thereby saving the computing resources required for monitoring the Kubernetes data stream.

[0072] In addition, in a specific embodiment of the present application, the following steps are also included: Figure 2 As shown:

[0073] S5. Reconnect the main component when it is disconnected.

[0074] When the main component crashes or the Kubernetes connection times out, the system will immediately restore the connection, compare the memory-managed data with the real-time data, retrieve the data lost during the disconnection, and push it to the business platform.

[0075] In addition, this application also includes the following specific operations:

[0076] Step s1: Configure the component's lock storage tool, such as MySQL, Etcd, ConfigMap, etc., to ensure stable storage and management of locks, thereby ensuring system stability and reliability.

[0077] Step s2: Configure the business middle station address and perform authentication so that the component can automatically connect to the business middle station. This ensures secure communication between the system and the business middle station and realizes the automatic connection of the system.

[0078] Step s3: Add a message queue client thread to the business process. After the business process starts, it automatically initiates a connection to the message queue to transmit and process messages. This ensures effective communication between the business process and the message queue, thereby achieving efficient message processing and transmission.

[0079] Step s4: Configure the number of HTTP connections the component makes to Kubernetes and the reconnection time after disconnections to avoid frequent HTTP connection creation due to multiple disconnections, which can affect system performance. This effectively optimizes the system's connection management and improves system stability and performance.

[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0081] Although the operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.

[0082] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0083] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer.

[0084] Figure 3 This is a block diagram of an operating status management device according to an embodiment of the present application.

[0085] like Figure 3 As shown, the operating status management device provided in this embodiment is applied to an electronic device, such as a computer, server, or cloud platform with information processing and data computing capabilities and networking capabilities. The operating status management device specifically includes a main component determination module 10, a data acquisition module 20, a data processing module 30, and a data push module 40.

[0086] The main component determination module is used to determine the main component from multiple components based on a competition method.

[0087] When multiple components start running, this application uses a competitive approach to determine the master component from among them. That is, multiple components are allowed to determine the master component by grabbing the lock. Here, the component that grabs the lock is described as the master component, and the components that do not grab the lock are called other components. The specific process is as follows:

[0088] First, multiple application components that enter the running state are controlled to obtain locks through competition, that is, they obtain locks equally without distinguishing between master and slave and priority.

[0089] Once a component acquires the lock, it is designated as the master component, and the others are designated as slave components. Furthermore, the master component is locked once every certain period of time to confirm its master status. For ease of description, this interval is referred to as the first duration.

[0090] At the same time, during the operation of multiple components, other components are controlled to grab the lock once every second time period to ensure that in the event of a main component downtime or disconnection, another component can be upgraded to the main component in time. In this application, the first time period is greater than the second time period. For example, the first time period can be selected as 30 seconds, and the second time period can be selected as 10 seconds, 15 seconds, 20 seconds, etc.

[0091] When the master component crashes or is disconnected, and another component obtains the lock through a competitive mechanism, the other component that obtains the lock will be upgraded to the master component, thus ensuring that the system always has a master component.

[0092] The data acquisition module is used to selectively acquire full data and incremental data based on the main component.

[0093] That is, first, the main component determined by the control is used to obtain the data of LIST&WATCH Kubernetes through the API. The data obtained is the full data of the Pod listed, and the full data is stored in the local memory manager; then, in the subsequent time, the data of the incremental update of the Pod, that is, the incremental data, is monitored and received in real time through a long connection. In addition, in a specific embodiment of the present application, the received data is also filtered to exclude junk data and useless data. The filtered data here include full data and incremental data, or one of the full data and incremental data.

[0094] The data processing module is used to process full data and incremental data.

[0095] Use a specific algorithm to process the full and incremental data and place the processed data into a specified queue. The specific algorithm here can be a hash algorithm or a modulo distribution scheduling algorithm.

[0096] The data push module pushes the processed data to the target working module in the push order.

[0097] After processing the full data and incremental data to obtain the processed data, the processed data is pushed to the target working module in a predetermined push order so that the target working module displays the processed data to the user. When the technical solution of the present application is applied to the field of telecommunications billing, the target working module can be the middle platform component, so that the middle platform component can efficiently display Pod data.

[0098] The push order can be determined according to the version number of the Pod; after the push order is determined, the processed data can be pushed to the target working module according to the push order.

[0099] As can be seen from the above technical solution, this embodiment provides an operation status management device, which is applied to electronic devices. Specifically, when multiple components start running, the main component is determined from the multiple components based on a competitive method; full data and incremental data are selectively obtained based on the main component; a specific algorithm is used to process the full data and incremental data, and the processed data is placed in a specified queue; the processed data is pushed to the target working module in the push order, so that the target working module displays the processed data. This solution only obtains full data when the main component is initially determined, and only obtains incremental data subsequently. In this way, the amount of data to be processed will be smaller, thereby saving the computing resources required for monitoring the Kubernetes data stream.

[0100] In addition, in a specific embodiment of the present application, a disconnection and reconnection module 50 is also included, such as Figure 4 As shown:

[0101] The disconnection and reconnection module is used to restore the connection when the main component is disconnected.

[0102] When the main component crashes or the Kubernetes connection times out, the system will immediately restore the connection, compare the memory-managed data with the real-time data, retrieve the data lost during the disconnection, and push it to the business platform.

[0103] In addition, another specific embodiment of the present application further includes a component configuration module 60, such as Figure 5 As shown, the component configuration module is used to perform the following specific operations:

[0104] Step s1: Configure the component's lock storage tool, such as MySQL, Etcd, ConfigMap, etc., to ensure stable storage and management of locks, thereby ensuring system stability and reliability.

[0105] Step s2: Configure the business middle station address and perform authentication so that the component can automatically connect to the business middle station. This ensures secure communication between the system and the business middle station and realizes the automatic connection of the system.

[0106] Step s3: Add a message queue client thread to the business process. After the business process starts, it automatically initiates a connection to the message queue to transmit and process messages. This ensures effective communication between the business process and the message queue, thereby achieving efficient message processing and transmission.

[0107] Step s4: Configure the number of HTTP connections the component makes to Kubernetes and the reconnection time after disconnections to avoid frequent HTTP connection creation due to multiple disconnections, which can affect system performance. This effectively optimizes the system's connection management and improves system stability and performance.

[0108] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0109] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0110] Figure 6 This is a block diagram of an electronic device according to an embodiment of the present application.

[0111] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. This electronic device is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0112] The electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 602 or a program loaded from an input device 606 into a random access memory RAM 603. Various programs and data required for the operation of the electronic device are also stored in the RAM. The processing device, ROM, and RAM are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0113] Typically, the following devices may be connected to the I / O interface: input devices such as a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 608 such as a magnetic tape, hard disk, etc.; and communication devices 609. Communication devices 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0114] The present application also provides a computer-readable storage medium embodiment.

[0115] The computer-readable storage medium is applied to an electronic device and carries one or more computer programs. When the one or more computer programs are executed by the electronic device, the electronic device determines the main component from the multiple components based on a competitive manner when multiple components start running; selectively obtains full data and incremental data based on the main component; uses a specific algorithm to process the full data and incremental data, and puts the processed data into a designated queue; pushes the processed data to the target working module in the order of push, so that the target working module displays the processed data. This solution only obtains full data when the main component is initially determined, and only obtains incremental data subsequently. In this way, the amount of data to be processed will be smaller, thereby saving the computing resources required for monitoring the Kubernetes data stream.

[0116] It should be noted that the computer-readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0117] In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0118] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0119] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0120] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0121] The technical solution provided by the present invention is introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for managing an operating state, applied to an electronic device, characterized in that: The operation status management method comprises the steps of: When the plurality of components begin to run, determining a master component from the plurality of components based on a competition method; selectively acquiring full data and incremental data based on the main component; Processing the full data and the incremental data using a specific algorithm, and placing the processed data into a designated queue; The processed data is pushed to the target working module in a pushing order, so that the target working module displays the processed data.

2. The operating status management method according to claim 1, wherein: When the multiple components start to run, determining the main component from the multiple components based on a competition method includes the following steps: Controlling the multiple components to acquire locks in a competitive manner; Determine the component that successfully acquires the lock as the main component, and control the main component to renew the lock once every first time period; Simultaneously controlling the other components except the main component to attempt to acquire the lock every second time period; The component that obtains the lock is determined as the main component.

3. The operating status management method according to claim 2, wherein: The first duration is greater than the second duration.

4. The operating status management method according to claim 1, wherein: The step of obtaining full data and incremental data based on the main component includes the following steps: The main component only obtains the full amount of data through the API interface for the first time; After obtaining the full data, the Pod is monitored through a long connection and the incremental data is obtained.

5. The operating status management method according to claim 4, wherein: The step of obtaining full data and incremental data based on the main component further includes the following steps: The full data and / or the incremental data are filtered to remove junk data and useless data.

6. The operating status management method according to claim 1, wherein: The method of pushing the processed data to the target working module in a pushing order comprises the steps of: Determine the push order according to the version number of the Pod; The push operation is performed according to the push order.

7. The operating status management method according to any one of claims 1 to 6, characterized in that: Also includes the steps: When the master component goes down or the Kubernetes connection is disconnected, the connection is restored and the data lost during the disconnection is retrieved.

8. The operating status management method according to claim 7, wherein: Also includes the steps: Configure the lock storage tool, business middle platform address, HTTP connection number of each component to Kubernetes and reconnection time after disconnection, and add a message queue client thread in the business process.

9. A running status management device, applied to electronic equipment, characterized in that: The operation status management device includes: a main component determination module configured to determine a main component from the plurality of components based on a competition method when the plurality of components begin to operate; A data acquisition module is configured to selectively acquire full data and incremental data based on the main component; a data processing module configured to process the full data and the incremental data using a specific algorithm, and to place the processed data into a designated queue; The data push module is configured to push the processed data to the target working module in a push order, so that the target working module displays the processed data.

10. The operating status management device according to claim 9, wherein: Also includes: The disconnection and reconnection module is configured to restore the connection when the main component goes down or the Kubernetes connection is disconnected, and to reacquire the data lost during the disconnection.

11. The operating status management device according to claim 9, wherein: Also includes: The component configuration module is configured to configure the lock storage tool, business middle platform address, the number of HTTP connections for the component to connect to Kubernetes, and the reconnection time after disconnection for each component, and add a message queue client thread in the business process.

12. An electronic device, characterized in that: The electronic device comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs or instructions; The processor is configured to execute the computer program or instruction so as to enable the electronic device to implement the operating status management method according to any one of claims 1 to 8.

13. A computer-readable storage medium, applied to an electronic device, characterized in that: The storage medium carries one or more computer programs, and the one or more computer programs can be executed by the electronic device, so that the electronic device implements the operation status management method according to any one of claims 1 to 8.