Interface object management method, device and system and storage medium
By deploying the same data source interface objects in the data acquisition cluster and managing the master-slave state, the cumbersome problem of server failure migration is solved, resource utilization and fault processing efficiency are improved, and the stability of data acquisition services is ensured.
Patent Information
- Application Number
- CN202411329339.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-20
AI Technical Summary
In the data acquisition cluster, the server failure migration process is cumbersome, resulting in low resource utilization and complex fault handling.
By deploying the same data source interface object on each acquisition node and managing the operating status of the data area based on the master-slave state, ensuring that there are no idle nodes in the data acquisition cluster, simplifying the failure migration process.
It improves the resource utilization rate of the data acquisition cluster, simplifies the failure migration process, and ensures the stability and efficiency of the data acquisition service.
Smart Images

Figure CN119166357A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a method, device, system and storage medium for managing an interface object. Background Art
[0002] When collecting data from a data source, it is necessary to access data source interfaces such as system serial ports, networks, files, and databases for data transmission.
[0003] At present, when the number of data sources is large, a single server cannot meet the performance requirements. You can access the data source interface through a server cluster. Each server can access some data source interfaces for data collection. In addition, in order to avoid failures such as downtime of a server in the server cluster, you can set up a backup server to replace the failed server to continue data collection.
[0004] However, when a server in the server group crashes, the user needs to re-establish a connection with the backup server and control the backup server to collect data, which makes the fault migration process more complicated. Summary of the invention
[0005] The present application provides an interface object management method, device, system and storage medium for solving the problem that the fault migration process is relatively complicated.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In the first aspect, the present application provides a method for managing interface objects. The method is applied to the first acquisition node in a data acquisition cluster, and each acquisition node of the data acquisition cluster is deployed with the same data area, and the data area is used to deploy data source interface objects, and the data source interface objects are used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. In this method, the master-slave status of the first data area of the first acquisition node is obtained, and the master-slave status is used to indicate whether the data area is a master data area or a slave data area. Based on the master-slave status of the first data area of the first acquisition node, the running status of the data source interface object in the first data area of the first acquisition node is determined; wherein the data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped state.
[0008] Based on the above technical solution, each acquisition node of the data acquisition cluster is deployed with the same data area, and the data area is used to deploy the data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. That is to say, the same data source interface object is deployed in each acquisition node. Then, the acquisition node can obtain the master-slave status of the deployed data area, and determine the running status of the data source interface object in the data area of the acquisition node based on the master-slave status of the data area. The master-slave status is used to indicate that the data area is a master data area or a slave data area, the data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped running state. In this way, each acquisition node can manage each data source object in the acquisition node through the master-slave status of the data area, so that there will be no idle acquisition nodes in the data acquisition cluster, thereby improving the resource utilization rate in the data acquisition cluster. In addition, since the same data source interface object is deployed in each acquisition node, there is no need for the user to re-establish the connection during fault migration, which can simplify the fault migration process.
[0009] In a possible design, a state change request is obtained, the state change request is used to indicate the change of the master-slave state of the first data area of the first acquisition node. In response to the state change request, the first data area of the first acquisition node is changed to the master data area or the slave data area.
[0010] In one possible design, a state change request sent by the second collection node is received, and the state change request is determined based on the load information of each collection node and / or the working status of each collection node; or, the load information of each collection node and / or the working status of each collection node is obtained, and based on the load information of each collection node and / or the working status of each collection node, a state change request is generated.
[0011] In a possible design, if the first data area of the first acquisition node is changed from the slave data area to the master data area, the data source interface object in the first data area of the first acquisition node is run; wherein the first data area of the second acquisition node is changed from the master data area to the slave data area. If the first data area of the first acquisition node is changed from the master data area to the slave data area, the data source interface object in the first data area of the first acquisition node is stopped; wherein the first data area of the second acquisition node is changed from the slave data area to the master data area.
[0012] In a possible design, the first collection node and the second collection node are further deployed with a second data area. When the first data area of the first collection node is the main data area, the second data area of the second collection node is the main data area. When the second data area of the first collection node is the main data area, the first data area of the second collection node is the main data area.
[0013] In one possible design, the master-slave status of the first data area of the first collection node is sent to a management node in the data collection cluster.
[0014] In a possible design, when the first data area of the first collection node is the main data area, a first collection request sent by the management node is received, and the first collection request is used to instruct the data source interface object in the first data area to collect data.
[0015] In a possible design, when the first data area of the first acquisition node is the primary data area, a first object management request sent by a management node in the data acquisition cluster is received, and the first object management request is used to request to perform a management operation on the data source interface object in the first data area. In response to the first object management request, a management operation is performed on the data source interface object in the first data area of the first acquisition node.
[0016] In one possible design, a synchronization request is sent to the second acquisition node, where the synchronization request is used to instruct to perform a management operation on the data source interface object in the first data area.
[0017] In a possible design, when the first data area of the first acquisition node is a slave data area and the first data area of the second acquisition node is a master data area, a synchronization request sent by the second acquisition node is received, and the synchronization request is used to indicate that a management operation is performed on the data source interface object in the first data area. In response to the synchronization request, a management operation is performed on the data source interface object in the first data area of the first acquisition node.
[0018] In the second aspect, the present application provides a method for managing interface objects, which is applied to management nodes in a data acquisition cluster, wherein each acquisition node in the data acquisition cluster is deployed with the same data area, which is used to deploy a data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. In this method, a first acquisition operation request is obtained, and the first acquisition operation request is used to request a target data source interface object to perform data acquisition. In response to the first acquisition operation request, the master-slave status of multiple target data areas where target data source interface objects are deployed is obtained, and the master-slave status is used to indicate whether the data area is a master data area or a slave data area. Based on the master-slave status of multiple target data areas, a first target acquisition node is determined from multiple acquisition nodes, and the target data area deployed by the first target acquisition node is the master data area. A second acquisition request is sent to the first target acquisition node, and the second acquisition request is used to instruct the target data source interface object to collect data.
[0019] In a possible design, the management node stores the master-slave status of the target data area of each acquisition node, receives the updated master-slave status of the target data area sent by each acquisition node, and stores the updated master-slave status of the target data area of each acquisition node.
[0020] In one possible design, the updated master-slave status of each target data area is used to indicate that the target data area of the first target acquisition node is a slave data area, and the target data area of the second target acquisition node is a master data area. A second acquisition operation request is obtained, and the second acquisition operation request is used to request the target data source interface object to perform data acquisition. In response to the second acquisition operation request, based on the updated master-slave status of each target data area, a third acquisition request is sent to the second target acquisition node, and the third acquisition request is used to instruct the target data source interface object to collect data.
[0021] In a possible design, when the target data area of the first target acquisition node is the main data area, a second object management request is sent to the first target acquisition node, and the second object management request is used to request to perform a management operation on the data source interface object in the target data area.
[0022] In a third aspect, the present application provides a method for managing an interface object, which is applied to a data collection cluster, wherein the data collection cluster includes multiple collection nodes and a management node, each collection node is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different collection nodes are the same. In this method, the management node obtains a first collection operation request, and the first collection operation request is used to request a target data source interface object to collect data. In response to the first collection operation request, the management node obtains the master-slave status of multiple target data areas where the target data source interface object is deployed, and the master-slave status is used to indicate whether the data area is a master data area or a slave data area. Based on the master-slave status of the multiple target data areas, the management node determines a first target collection node from multiple collection nodes, and the target data area deployed by the first target collection node is the master data area. The management node sends a second collection request to the first target collection node, and the second collection request is used to instruct the target data source interface object to collect data. In response to the second collection request, the first target collection node collects data through the target data source interface object in the target data area of the first target collection node.
[0023] In a fourth aspect, the present application provides an interface object management device, which is applied to the first acquisition node in a data acquisition cluster, each acquisition node in the data acquisition cluster is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. The device includes: an acquisition module, which is used to obtain a state change request, and the state change request is used to indicate that the first data area of the first acquisition node is changed to a master data area or a slave data area. A processing module is used to change the first data area of the first acquisition node to a master data area or a slave data area in response to the state change request; wherein the data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped state.
[0024] In a fifth aspect, the present application provides an interface object management device, which is applied to a management node in a data acquisition cluster, wherein each acquisition node in the data acquisition cluster is deployed with the same data area, and the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. The device includes: an acquisition module, which is used to obtain a first acquisition operation request, and the first acquisition operation request is used to request a target data source interface object to perform data acquisition. The acquisition module is also used to obtain the master-slave status of multiple target data areas deployed with the target data source interface object in response to the first acquisition operation request, and the master-slave status is used to indicate whether the data area is a master data area or a slave data area. The processing module is used to determine a first target acquisition node from multiple acquisition nodes based on the master-slave status of multiple target data areas, and the target data area deployed by the first target acquisition node is the master data area. The sending module is used to send a second acquisition request to the first target acquisition node, and the second acquisition request is used to instruct the target data source interface object to collect data.
[0025] In a sixth aspect, the present application provides a management system for interface objects, the system includes multiple acquisition nodes and management nodes, each acquisition node is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. The management node is used to obtain a first acquisition operation request, and the first acquisition operation request is used to request a target data source interface object to perform data acquisition. The management node is used to respond to the first acquisition operation request and obtain the master-slave status of multiple target data areas where the target data source interface object is deployed, and the master-slave status is used to indicate whether the data area is a master data area or a slave data area. The management node is used to determine a first target acquisition node from multiple acquisition nodes based on the master-slave status of the multiple target data areas, and the target data area deployed by the first target acquisition node is the master data area. The management node is used to send a second acquisition request to the first target acquisition node, and the second acquisition request is used to instruct the target data source interface object to collect data. The first target acquisition node is used to respond to the second acquisition request, and the first target acquisition node collects data through the target data source interface object in the target data area of the first target acquisition node.
[0026] In the seventh aspect, the present application provides an interface object management device, the device comprising: a processor and a memory; the processor and the memory are coupled; the memory is used to store one or more programs, the one or more programs including computer execution instructions, when the interface object management device is running, the processor executes the computer execution instructions stored in the memory to implement the method described in the first aspect and any possible implementation of the first aspect.
[0027] In an eighth aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method described in the above-mentioned first aspect and any possible implementation manner of the first aspect.
[0028] In a ninth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the method described in the first aspect and any possible implementation of the first aspect.
[0029] In a tenth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to execute the method described in the above-mentioned first aspect and any possible implementation manner of the first aspect.
[0030] In the above scheme, the technical problems that can be solved by the interface object management device, the interface object management system, computer storage medium, chip or computer program product and the technical effects achieved can be referred to the technical problems and technical effects solved by the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A system architecture diagram of a management system for an interface object provided in an embodiment of the present application;
[0032] Figure 2 A flowchart of a method for managing an interface object provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of an example of deploying a data area and an interface object provided in an embodiment of the present application;
[0034] Figure 4 A flowchart of another method for managing an interface object provided in an embodiment of the present application;
[0035] Figure 5 A flowchart of another method for managing an interface object provided in an embodiment of the present application;
[0036] Figure 6 A schematic diagram of the structure of an interface object management device provided in an embodiment of the present application;
[0037] Figure 7 A schematic diagram of the structure of another interface object management device provided in an embodiment of the present application;
[0038] Figure 8 A schematic diagram of the structure of another interface object management device provided in an embodiment of the present application;
[0039] Fig. 9 A conceptual partial view of a computer program product provided for an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] The terms “first” and “second” in the description and claims of the present application are used to distinguish different objects rather than to describe a specific order of the objects.
[0042] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.
[0043] In addition, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present concepts in a specific way.
[0044] Some technical terms in this application are explained below.
[0045] 1. Data source interface refers to data resources related to software and hardware such as system serial port, network, file, camera, database, etc. The data resources can also include data resources related to application protocols such as tcp, udp, http, https, mqtt, sql, etc. Among them, serial port data acquisition is to open the serial port resources on the system, and to interact with serial port hardware devices through the serial bus RS232 / RS485 to collect data. Network data is collected through the Ethernet interface, including various network communication protocols, such as camera, tcp, udp, http / https, mqtt, sql, and some databases can also be collected through the network, such as mysql, pgsql, sqlserver, and some files can also be transmitted through the network through file transfer protocols, such as ftp protocol. Local file data acquisition is collected by opening the local file resource interface, reading local files in the hard disk of the continuous monitoring server, and some databases can also be read in this way, such as sqlite database. Remote files are read in a network way.
[0046] 2. Data object is an abstraction of objective things. Data objects are usually composed of a set of data that identify the characteristics of objective things. In the embodiment of the present application, the objective thing is a data source interface, which is virtualized into a data source interface object. The data source interface object is used to characterize the data source interface. The data source interface object contains various attribute members, such as interface object name, description, open status, start and stop flags, and sending and receiving data.
[0047] At present, when accessing the data source interface through a server cluster, a data source interface object can be deployed in the server, which contains the attributes of the operation interface required for interface access. The server can access the data source interface through the data source interface object. In addition, in order to avoid failures such as downtime of a server in the server cluster, a redundant server can be set up to replace the failed server to continue data collection.
[0048] However, in the above scheme, the redundant server will collect data only when the failed server fails to work. If no server in the server cluster fails, the redundant server is idle. This results in low resource utilization in the server cluster.
[0049] In order to solve the above technical problems, the embodiment of the present application provides a method for managing interface objects. In the method, each acquisition node of the data acquisition cluster is deployed with the same data area, and the data area is used to deploy data source interface objects, and the data source interface objects are used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. That is to say, the same data source interface object is deployed in each acquisition node. Then, the acquisition node can obtain the master-slave status of the deployed data area, and determine the running state of the data source interface object in the data area of the acquisition node based on the master-slave status of the data area. The master-slave status is used to indicate that the data area is a master data area or a slave data area, the data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped running state. In this way, each acquisition node can manage each data source object in the acquisition node through the master-slave status of the data area, so that there will be no idle acquisition nodes in the data acquisition cluster, thereby improving the resource utilization rate in the data acquisition cluster. In addition, since the same data source interface object is deployed in each acquisition node, there is no need for the user to re-establish the connection during fault migration, which can simplify the fault migration process.
[0050] The implementation environment of the embodiments of the present application is introduced below.
[0051] like Figure 1 As shown, a management system of an interface object provided in an embodiment of the present application includes: an electronic device 101, a data acquisition cluster 102, and the data acquisition cluster 102 may include: a management node 1021 and multiple acquisition nodes (such as acquisition node 1022, acquisition node 1023 and acquisition node 1024).
[0052] Among them, the electronic device 101 can receive the user's business management operation, and execute the corresponding business in response to the user's business management operation. For example, the electronic device 101 can send a data collection instruction to the data collection cluster 102. And after the data collection cluster collects the data, it can send the collected data to the electronic device 101. Alternatively, the electronic device 101 can receive the user's management operation on the data source interface object, and in response to the management operation on the data source interface object, control the data collection cluster to manage the data source interface object, such as deleting the data source interface object, adding a new data source interface object, etc. Among them, the data source interface object is used to collect data of the corresponding data source interface.
[0053] It should be noted that the embodiments of the present application do not limit the electronic device (i.e., the device operated by the user). The electronic device in the embodiments of the present application may be a tablet computer, a mobile phone, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR)\virtual reality (VR) device, a vehicle-mounted device, a server, and the like. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0054] The management node 102 is used to forward messages between the electronic device 101 and the collection node. For example, the electronic device 101 sends a data collection instruction to the management node 1021, and the management node 1021 can send the data collection instruction to one of the multiple collection nodes. In addition, the management node 1021 can manage the master-slave status of each data in each collection node. For example, the management node can receive the master-slave status of each data area in each collection node, and store the master-slave status of each data area in each collection node. In addition, the management node 1021 can manage the relationship between the electronic device 101 and the data source interface object, and the relationship between the data source interface object and the data area.
[0055] Exemplarily, the management node 102 may be a gateway.
[0056] At least one data area is deployed in the collection node, and at least one data source interface object is deployed in each data area. The collection node can collect data through the data source interface object. In addition, the collection node can adjust the master-slave status of each data area in the collection node based on the load information of the collection node and / or the working status of the collection node, and synchronize it to the management node 1021. For example, if the data area 1 in the collection node 1022 is changed from the master data area to the slave data area, the collection node 1022 can send a message to the management node 1021 to indicate that the data area 1 in the collection node 1022 is changed to the slave data area. Alternatively, a collection node can adjust the master-slave status of each data area of other collection nodes. For example, the collection node 1022 can send messages to the collection node 1023 and the collection node 1024 respectively to adjust the master-slave status of each data area in the collection node 1023 and the collection node 1024. In addition, the collection node can also adjust the running status of the data source interface object based on the master-slave status of the data area. For example, when data zone 1 in acquisition node 1022 is changed to a slave data zone, the data source interface objects in data zone 1 of acquisition node 1022 are all in a stopped state. In addition, data source interface objects can be synchronized between acquisition nodes so that the data source interface objects in the same data zone in each acquisition node are the same. For example, data zone 1 and data zone 2 are deployed in acquisition node 1022, acquisition node 1023, and acquisition node 1024, and data zone 1 is deployed with data source interface object a, and data zone 2 is deployed with data source interface object b.
[0057] Optionally, a data source interface (i.e., a collection interface) is also deployed in the collection node. The data source interface object corresponds to the data source interface. When the collection node collects data through the data source interface object, the data source interface object can trigger the data source interface to collect data through operation mapping.
[0058] Exemplarily, the collection interface may send a collection instruction to the data source device to instruct the data source device to send data to the data source interface. Afterwards, the data source device may send data to the data source interface.
[0059] It should be noted that the collection node may be a server. The server may be a single physical server. Alternatively, the server may be a cloud server. The data collection cluster may also be a server cluster composed of multiple servers. Alternatively, the server cluster may also be a distributed cluster. The embodiments of the present application do not limit the specific implementation of the server.
[0060] In some embodiments, the management system of the interface object may further include at least one data source device. The data source device stores data. One data source interface corresponds to one data source device. The collection node may send instructions to the data source device through the data source interface corresponding to the data source interface object. Furthermore, the data source device may send data to the collection node through the data source interface corresponding to the data source interface object.
[0061] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0062] In some embodiments, the electronic device may send a data zone creation request to each collection node in the data collection cluster. Afterwards, in response to the data zone creation request, each collection node may deploy the data zone on its own node.
[0063] In a possible implementation, the electronic device may send a data area creation request to the management node. Afterwards, the management node may send a data area creation request to each collection node.
[0064] In one possible design, the data zone creation request includes an identifier of the data zone, and the management node may store the identifier of the data zone.
[0065] It should be noted that after creating the data area, the electronic device can deploy a data source interface object in the data area, and the data source interface object is managed by the collection node.
[0066] like Figure 2 As shown, a method for managing an interface object provided in an embodiment of the present application includes:
[0067] S201. A first acquisition node obtains a master-slave status of a first data area of the first acquisition node.
[0068] The first acquisition node is any one of the multiple acquisition nodes in the data acquisition cluster, and the first data area is any one of the at least one data area deployed in the first acquisition node.
[0069] In an embodiment of the present application, each collection node of the data collection cluster is deployed with the same data area, which is used to deploy data source interface objects (which can be simply referred to as interface objects), and the data source interface objects are used to collect data; the data source interface objects in the same data area of different collection nodes are the same.
[0070] For example, Figure 3 As shown, data area a, data area b and data area c are deployed in collection nodes 301, 302 and 303. Interface object 1 and interface object 2 are deployed in data area a, interface object 3 is deployed in data area b, and interface object 4 is deployed in data area c.
[0071] In the embodiment of the present application, the master-slave status is used to indicate whether a data area is a master data area or a slave data area.
[0072] In a possible design, the master-slave state is first state information or second state information, the first state information is used to indicate that the data area is a master data area, and the second state information is used to indicate that the data area is a slave data area.
[0073] S202: The first collection node determines the running state of the data source interface object in the first data area of the first collection node based on the master-slave state of the first data area of the first collection node.
[0074] The data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped state.
[0075] In a possible implementation, if the first data area of the first acquisition node is the master data area, the data source interface object in the first data area of the first acquisition node is run. If the first data area of the first acquisition node is the slave data area, the data source interface object in the first data area of the first acquisition node is not run.
[0076] Based on the above technical solution, each acquisition node of the data acquisition cluster is deployed with the same data area, and the data area is used to deploy the data source interface object, and the data source interface object is used to collect data; the data source interface objects in the same data area of different acquisition nodes are the same. That is to say, the same data source interface object is deployed in each acquisition node. Then, the acquisition node can obtain the master-slave status of the deployed data area, and determine the running status of the data source interface object in the data area of the acquisition node based on the master-slave status of the data area. The master-slave status is used to indicate that the data area is a master data area or a slave data area, the data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped running state. In this way, each acquisition node can manage each data source object in the acquisition node through the master-slave status of the data area, so that there will be no idle acquisition nodes in the data acquisition cluster, thereby improving the resource utilization rate in the data acquisition cluster. In addition, since the same data source interface object is deployed in each acquisition node, there is no need for the user to re-establish the connection during fault migration, which can simplify the fault migration process.
[0077] It should be noted that the collection node can change the collection node running the data source interface object by adjusting the master-slave status of the data area.
[0078] In some embodiments, the first acquisition node may obtain a state change request, which is used to indicate changing the master-slave state of the first data area of the first acquisition node. In response to the state change request, the first data area of the first acquisition node is changed to a master data area or a slave data area.
[0079] In a possible design, if the first data area of the first acquisition node is the master data area, then in response to the state change request, the first acquisition node changes the first data area of the first acquisition node to the slave data area. If the first data area of the first acquisition node is the slave data area, then in response to the state change request, the first acquisition node changes the first data area of the first acquisition node to the master data area.
[0080] In one possible design, the state change request includes: an identifier of the first data area, first state information, or second state information.
[0081] It is understandable that after the first acquisition node obtains the state change request, the first acquisition node can complete the management of the running state of the data source interface object in the data area by changing the master-slave state of the data area.
[0082] It should be noted that in the same data area deployed on multiple collection nodes, only one master data area can exist at the same time, and the other data areas are slave data areas.
[0083] In some embodiments, if the first data area of the first acquisition node is changed from the slave data area to the master data area, the first acquisition node runs the data source interface object in the first data area of the first acquisition node. Moreover, before the first data area of the first acquisition node is changed from the slave data area to the master data area, if the first data area of the second acquisition node is the master data area, the second acquisition node can obtain a first state change request, and the first state change request can be used to indicate the change of the master-slave state of the first data area of the second acquisition node. Afterwards, in response to the first state change request, the second acquisition node can change the first data area of the second acquisition node from the master data area to the slave data area.
[0084] That is to say, when the master-slave status of the data area is not changed, the first data area of the first acquisition node is the slave data area, and the first data area of the second acquisition node is the master data area. When the master-slave status of the data area is changed, the first data area of the first acquisition node is the master data area, and the first data area of the second acquisition node is the slave data area.
[0085] It should be noted that the second collection node is any collection node among the multiple collection nodes except the first collection node.
[0086] In some embodiments, if the first data area of the first acquisition node is changed from the master data area to the slave data area, the first acquisition node stops running the data source interface object in the first data area of the first acquisition node. In addition, before the first data area of the first acquisition node is changed from the master data area to the slave data area, if the first data area of the second acquisition node is the slave data area, the second acquisition node can obtain a second state change request, and the second state change request can be used to indicate the change of the master-slave state of the first data area of the second acquisition node. Afterwards, in response to the second state change request, the second acquisition node can change the first data area of the second acquisition node from the master data area to the master data area.
[0087] That is to say, when the master-slave status of the data area is not changed, the first data area of the first acquisition node is the master data area, and the first data area of the second acquisition node is the slave data area. When the master-slave status of the data area is changed, the first data area of the first acquisition node is the slave data area, and the first data area of the second acquisition node is the master data area.
[0088] In this way, it can be ensured that in the same data area deployed on multiple collection nodes, only one master data area can exist at the same time, and thus only one data source interface object in the data area is in operation. In this way, it can be avoided that the data source interface objects in the same data area of different collection nodes are running at the same time, thereby ensuring the accuracy of data collection.
[0089] It should be noted that, in some embodiments, a collection node may generate a state change request, or obtain a state change request from another collection node.
[0090] In a possible implementation, the first collection node may obtain the load information of each collection node and / or the working status of each collection node among the multiple collection nodes. Afterwards, the first collection node may generate a state change request based on the load information of each collection node and / or the working status of each collection node.
[0091] In a possible design, when the data area of the first acquisition node is the master data area, if the load information of the first acquisition node and / or the load information of the first acquisition node does not meet the preset condition, the first acquisition node generates a state change request for instructing the first data area of the first acquisition node to be changed to a slave data area. When the data area of the first acquisition node is the slave data area, if the load information of the first acquisition node and / or the load information of the first acquisition node meets the preset condition, the first acquisition node generates a state change request for instructing the first data area of the first acquisition node to be changed to the master data area.
[0092] The preset conditions include: the load information of the first acquisition node meets the first condition, and the working state of the first acquisition node meets the second condition.
[0093] It should be noted that the first condition is not limited in the embodiment of the present application. For example, the first condition may be that the load information of the collection node is the load information with the smallest load information among multiple collection nodes. For another example, the first condition may be that the load information of the collection node is the load information with the load information less than a preset load threshold among multiple collection nodes. Furthermore, the second condition is not limited in the embodiment of the present application. For example, the second condition may be that the working state of the collection node is normal.
[0094] It should be noted that the embodiments of the present application do not limit the load information. For example, the load information may be the amount of data processed. For another example, the load information may be the ratio between the amount of data processed by the acquisition node and the load capacity of the acquisition node. For another example, the load information may be the number of master data areas in the acquisition node.
[0095] In a possible design, the load information is taken as the number of master data areas in the acquisition node. The first acquisition node can obtain the number of master data areas in each of the multiple acquisition nodes. If there is a target node (such as the first acquisition node) whose number of master data areas is greater than a preset number threshold, the first acquisition node can be used to indicate the state change request of the first data area of the first acquisition node to change to a slave data area. In addition, the first acquisition node can determine to update the master data area of the first data area to the acquisition node that meets the preset conditions based on the number of master data areas in each acquisition node, and send a message to the acquisition node that meets the preset conditions to indicate that the first data area is changed to the master data area.
[0096] It should be noted that the embodiments of the present application do not limit the preset number threshold. For example, the preset number threshold may be the average value of the number of master data areas in multiple acquisition nodes. For another example, the preset number threshold is the number of master data areas in any acquisition node in the data acquisition cluster.
[0097] Exemplarily, if the data area a in the first acquisition node is a primary data area, when a failure occurs in the first acquisition node, a state change request may be generated.
[0098] In a possible design, the working state of the acquisition node may include: a first working state and / or a second working state. The first working state is the operating state of the acquisition node, and the second working state is the operating state of the data area in the acquisition node. If the first working state is a normal state and the second working state is a normal state, the working state of the acquisition node is a normal state. If the first working state is an abnormal state, or the second working state is an abnormal state, the working state of the acquisition node is an abnormal state.
[0099] It should be noted that the second working state in this application is the operating state of any data area in the acquisition node. For example, when determining whether to change the master-slave state of data area a, it can be determined based on the operating state of data area a.
[0100] The following is an introduction to the master-slave status change of the data area with a specific example. Figure 3 , if data area a in acquisition node 301 is the master data area, and data area a in acquisition node 302 and acquisition node 303 is the slave data area. If the load information of acquisition node 301 does not meet the first condition (or the operation state of acquisition node 301 is abnormal, or the operation state of data area a of acquisition node 301 is abnormal), and the load information of acquisition node 302 meets the first condition, and the working state of acquisition node 302 meets the second condition (such as the first working state is normal, and the operation state of data area a is normal), then data area a of acquisition node 301 is updated to the slave data area, and data area a of acquisition node 302 is updated to the master data area.
[0101] It is understandable that the first acquisition node can generate a state change request by acquiring the load information of each acquisition node and / or the working status of each acquisition node, and then adjust the master-slave status of the data area in each acquisition node. In this way, the resources in the data acquisition cluster can be flexibly allocated, and the resource utilization rate is improved. In addition, it can ensure that data acquisition is always in a normal operating state, which improves the stability of the business.
[0102] In another possible implementation, the second collection node may obtain the load information of each collection node and / or the working status of each collection node, and generate a state change request based on the load information of each collection node and / or the working status of each collection node. Then, the first collection node may receive the state change request sent by the second collection node.
[0103] It should be noted that the way the second collection node generates a state change request based on the load information of each collection node and / or the working status of each collection node can refer to the method for the first collection node to generate a state change request, which is not described in detail here.
[0104] It is understandable that the first acquisition node can flexibly allocate resources in the data acquisition cluster by accepting the state change request sent by the second acquisition node, thereby improving resource utilization, and can ensure that data acquisition is always in a normal operating state, thereby improving business stability.
[0105] In some embodiments, a master data area is deployed in each collection node of the data collection cluster.
[0106] In a possible design, the first collection node and the second collection node are further deployed with a second data area, and the second data area is any data area in the collection node. Wherein, when the first data area of the first collection node is the primary data area, the second data area of the second collection node is the primary data area. Where the second data area of the first collection node is the primary data area, the first data area of the second collection node is the primary data area.
[0107] Exemplary, combined Figure 3 , if data area a in acquisition node 301 is the master data area, data area b and data area c are both slave data areas. In acquisition node 302, data area a and data area c are slave data areas, and data area b is the master data area. In acquisition node 303, data area a and data area b are slave data areas, and data area c is the master data area.
[0108] It can be understood that when the first data area of the first acquisition node is the main data area, the second data area of the second acquisition node is the main data area, and when the second data area of the first acquisition node is the main data area, the first data area of the second acquisition node is the main data area. In this way, it can be ensured that the main data area is deployed in each acquisition node in the data acquisition cluster, so that each acquisition node is in a working state, thereby improving the resource utilization of the acquisition cluster.
[0109] In some embodiments, the data collection cluster further includes a management node, which can manage the data area and data source interface objects in the collection node.
[0110] In a possible implementation, the management node can manage the master-slave status of the data area in each collection node. The first collection node can send the master-slave status of the first data area of the first collection node to the management node in the data collection cluster.
[0111] Optionally, the first collection node may periodically send the master-slave status of the first data area of the first collection node to the management node.
[0112] Optionally, when the master-slave status of the first data area of the first collection node changes, the first collection node may send the master-slave status of the first data area of the first collection node to the management node.
[0113] It can be understood that the first collection node sends the master-slave status of the first data area to the management node, so that the management node can timely understand the status of each data area in each collection node, which is convenient for the management node to manage the data area.
[0114] It should be noted that in the embodiment of the present application, the electronic device can receive the user's operation, generate a management instruction for the data source interface object, and send it to the management node. Afterwards, the management node can send the management instruction to the collection node of the main data area where the data source interface object is deployed.
[0115] In some embodiments, the management instruction may be an object deployment request. The electronic device may receive an object deployment operation and generate an object deployment request, the object deployment request being used to instruct the deployment of a data source interface object in a first data zone, the object deployment request including an identifier of the data source interface object and an identifier of the first data zone where the data source interface object is deployed. Afterwards, the electronic device may send the object deployment request to the management node. Afterwards, the management node may determine that the deployed first data zone is a collection node of a primary data zone. In the case where the first data zone of the first collection node is the primary data zone, the management node may send the object deployment request to the first collection node, and after receiving the object deployment request, the first collection node may deploy the data source interface object in the first data zone.
[0116] In some embodiments, the management instruction may be an object management request. The electronic device may receive an object management operation and generate a first object management request, wherein the first object management request is used to request to perform a management operation on a data source interface object in a first data area. Afterwards, when the first data area of the first acquisition node is a primary data area, the management node may send the first object management request to the first acquisition node. Afterwards, the first acquisition node receives the first object management request sent by the management node. Then, in response to the first object management request, the first acquisition node may perform a management operation on the data source interface object in the first data area of the first acquisition node.
[0117] In one possible design, the management operation may include a deployment operation, a deletion operation, an object update operation, etc.
[0118] Optionally, after the first acquisition node performs a management operation on the data source interface object in the first data area, the first acquisition node may send a synchronization request to the second acquisition node, where the synchronization request is used to instruct to perform a management operation on the data source interface object in the first data area. Thereafter, in response to the synchronization request, the second acquisition node may perform a management operation on the data source interface object in the first data area.
[0119] For example, if the first acquisition node deploys the interface object a in the first data area, the second acquisition node may also deploy the interface object a in the first data area. Alternatively, if the first acquisition node deletes the interface object a in the first data area, the second acquisition node may also delete the interface object a in the first data area.
[0120] It is understandable that, through synchronization requests, the data source interface objects in the data area of each collection node can be kept synchronized. In this way, when the master-slave status of the data area changes, each collection node can collect data through the data source interface object in a timely manner to ensure that the data collection service can run normally.
[0121] In some embodiments, when the first data area of the first acquisition node is a slave data area and the first data area of the second acquisition node is a master data area, the first acquisition node may receive a synchronization request sent by the second acquisition node, the synchronization request being used to instruct to perform a management operation on the data source interface object in the first data area. In response to the synchronization request, the management operation is performed on the data source interface object in the first data area of the first acquisition node.
[0122] In an embodiment of the present application, when a management node receives a collection operation request, the management node may send a collection request to the collection node based on the master-slave status of the data area in each collection node to instruct the collection node that receives the collection request to perform data collection.
[0123] like Figure 4 As shown, a method for managing an interface object provided in an embodiment of the present application includes:
[0124] S401: A management node obtains a first collection operation request.
[0125] The first acquisition operation request is used to request the target data source interface object to perform data acquisition.
[0126] In a possible implementation, the electronic device may receive a data collection operation of a user and generate a first collection operation request, wherein the first collection operation request includes an identifier of a target data source interface object. Afterwards, the electronic device may send the first collection operation request to a management node, and the management node may receive the first collection operation request sent by the electronic device.
[0127] S402: In response to the first acquisition operation request, the management node obtains the master-slave status of multiple target data areas where target data source interface objects are deployed.
[0128] The management node stores the master-slave status and the first corresponding relationship of the data area of each acquisition node. The first corresponding relationship is the relationship between the data source interface object and the data area.
[0129] Exemplarily, the first corresponding relationship may include a relationship between an identifier of a data source interface object and an identifier of a data area. As shown in Table 1, it shows a relationship between a data source interface object and a data area.
[0130] Table 1
[0131] Identifier of the data source interface object Data area identifier Interface object 1 Data Area 1 Interface object 2 Data Area 1 Interface object 3 Data Area 2 Interface Object 4 Data Area 3
[0132] That is, interface object 1 and interface object 2 are deployed in data area 1 , interface object 3 is deployed in data area 2 , and interface object 4 is deployed in data area 3 .
[0133] In a possible implementation manner, the management node may determine multiple target data areas based on the first corresponding relationship and the identifier of the target data source interface object, and determine the master-slave status of the multiple target data areas.
[0134] Exemplarily, the target data area is data area a, and data area a is deployed in collection nodes a, collection nodes b, and collection nodes c. The data area in collection node a is the master data area, and the data areas in collection nodes a and collection nodes c are slave data areas.
[0135] S403: The management node determines a first target collection node from multiple collection nodes based on the master-slave status of multiple target data areas.
[0136] Among them, the target data area deployed by the first target acquisition node is the main data area.
[0137] Exemplarily, the data area in the acquisition node a is the primary data area, and the data areas in the acquisition nodes a and c are secondary data areas. Then the acquisition node a is the first target acquisition node.
[0138] In a possible design, a second corresponding relationship is stored in the management node, and the second corresponding relationship is a corresponding relationship between a main data area of each data area and a collection node.
[0139] Optionally, the second corresponding relationship also includes a corresponding relationship between a slave data area of each data area and a collection node.
[0140] Exemplarily, as shown in Table 2, a second corresponding relationship is shown.
[0141] Table 2
[0142] Master Data Area Collection Node Data Area 1 Collection node a Data Area 2 Collection node a Data Area 3 Collection node b Data Area 4 Collection Node c
[0143] That is, data area 1 and data area 2 in acquisition node a are main data areas, data area 3 in acquisition node b is the main data area, and data area 4 in acquisition node c is the main data area.
[0144] In a possible implementation manner, the management node determines the first target collection node based on the identifier of the target data area and the second corresponding relationship.
[0145] S404: The management node sends a second collection request to the first target collection node.
[0146] The second acquisition request is used to instruct the target data source interface object to acquire data. The second acquisition request may include an identifier of the target data source interface object.
[0147] In a possible implementation, the address of each collection node is stored in the management node. The management node may send the second collection request to the first target collection node based on the address of the first target collection node.
[0148] The following example takes the first target acquisition node as the first acquisition node, the target data area as the first data area, and the target data source interface object as the interface object in the first data area. When the first data area of the first acquisition node is the main data area, the first acquisition node receives a first acquisition request sent by the management node, and the first acquisition request is used to instruct the data source interface object in the first data area to collect data. Afterwards, in response to the first acquisition request, the first acquisition node can control the data source interface object to collect data.
[0149] In some embodiments, after the first target collection node collects data through the target data source interface object, the first target collection node may send the collected data to the electronic device.
[0150] In a possible implementation, the first target collection node sends a target message to the management node, and the target message includes the collected data and the identifier of the target data source interface object. Afterwards, the management node can determine the electronic device based on the identifier of the target data source interface object and the third corresponding relationship. The third corresponding relationship is the relationship between the electronic device and the data source interface object. Then, the management node can send the collected data to the electronic device.
[0151] It should be noted that the relationship between the electronic device and the data source interface object is used to indicate the electronic device that calls the data source interface object to collect data.
[0152] Exemplarily, as shown in Table 3, a third corresponding relationship is shown.
[0153] Table 3
[0154] Data source interface object Electronic devices Interface object 1 Equipment Interface object 2 Equipment Interface object 3 Device b Interface Object 4 Device c
[0155] That is to say, device a calls interface object 1 and interface object 2, device b calls interface object 3, and device c calls interface object 4.
[0156] Based on the above technical solution, after the management node obtains the first acquisition operation request, it can obtain the master-slave status of multiple target data areas where the target data source interface objects are deployed, and based on the master-slave status of the multiple target data areas, determine the first target acquisition node from multiple acquisition nodes, and the target data area deployed by the first target acquisition node is the master data area. Then, the management node sends a second acquisition request to the first target acquisition node to instruct the target data source interface object to collect data. In other words, the management node only sends acquisition instructions to the acquisition node that deploys the master data area. In this way, it can avoid that multiple acquisition nodes execute a collection business at the same time, which improves the rationality of business allocation; and it can ensure that different acquisition nodes execute different collection businesses to improve resource utilization.
[0157] In some embodiments, the management node stores the master-slave status of the target data area of each collection node. When the master-slave status of the collection node changes, the management node can receive the updated master-slave status of the target data area sent by each collection node. Afterwards, the management node can store the updated master-slave status of the target data area of each collection node.
[0158] In this way, it can be ensured that the management node can timely understand the master-slave status of the data area in each collection node, so that the subsequent management node can accurately send the electronic device's management request for the data source interface object to the collection node.
[0159] In a possible design, the updated master-slave status of each target data area is used to indicate that the target data area of the first target acquisition node is a slave data area, and the target data area of the second target acquisition node is a master data area.
[0160] The management node may obtain a second acquisition operation request, the second acquisition operation request being used to request the target data source interface object to perform data acquisition. Afterwards, in response to the second acquisition operation request, based on the updated master-slave status of each target data area, a third acquisition request is sent to the second target acquisition node, the third acquisition request being used to instruct the target data source interface object to acquire data.
[0161] That is, when the target data area of the first target acquisition node is the main data area, the management node can send an acquisition request to the first target acquisition node, and when the target data area of the second target acquisition node is the main data area, the management node sends an acquisition request to the second target acquisition node.
[0162] In this way, by updating the master-slave status of the data area in different collection nodes, the collection node running the data source interface object can be changed. In this way, the resources in the data collection cluster can be reasonably utilized, which not only improves the resource utilization rate, but also ensures the normal operation of the data collection business.
[0163] In some embodiments, when the target data area of the first target acquisition node is the main data area, the management node may send a second object management request to the first target acquisition node, the second object management request being used to request to perform a management operation on the data source interface object in the target data area. In addition, in response to the second object management request, the second target acquisition node may perform a management operation on the data source interface object in the target data area.
[0164] It should be noted that, for the specific introduction of the management node sending the second object management request to the first target collection node, reference can be made to the introduction of the management node sending the first object management request to the first collection node in the above embodiment, which will not be repeated here.
[0165] like Figure 5 As shown, a method for managing an interface object provided in an embodiment of the present application includes:
[0166] S501: A management node obtains a first collection operation request.
[0167] The first acquisition operation request is used to request the target data source interface object to perform data acquisition;
[0168] S502: In response to the first acquisition operation request, the management node obtains the master-slave status of multiple target data areas where target data source interface objects are deployed.
[0169] The master-slave status is used to indicate whether the data area is a master data area or a slave data area.
[0170] S503: The management node determines a first target collection node from multiple collection nodes based on the master-slave status of multiple target data areas.
[0171] Among them, the target data area deployed by the first target acquisition node is the main data area;
[0172] S504: The management node sends a second collection request to the first target collection node.
[0173] The second collection request is used to instruct the target data source interface object to collect data.
[0174] S505 . In response to the second collection request, the first target collection node collects data through the target data source interface object in the target data area of the first target collection node.
[0175] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that the management device of the interface object includes a hardware structure and / or software module corresponding to the execution of each function in order to realize the above functions. Those skilled in the art should easily realize that, in combination with the management method steps of the interface objects of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 this application.
[0176] The embodiment of the present application also provides a management device for an interface object. The management device for the interface object can be a server (or electronic device), a CPU in the server, a management module in the server for managing the interface object, or a client in the server for managing the interface object.
[0177] The embodiment of the present application can divide the management device of the interface object into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division. There may be other division methods in actual implementation.
[0178] The present application embodiment provides a management device for an interface object. Figure 6 As shown, the management device of the interface object may include: an acquisition module 601 and a processing module 602 .
[0179] The acquisition module 601 is used to acquire a state change request, and the state change request is used to indicate that the first data area of the first acquisition node is changed to the master data area or the slave data area. The processing module 602 is used to respond to the state change request and change the first data area of the first acquisition node to the master data area or the slave data area; wherein the data source interface object in the master data area is in the running state, and the data source interface object in the slave data area is in the stopped running state.
[0180] The present application embodiment also provides another interface object management device. Figure 7 As shown, the management device of the interface object may include: an acquisition module 701 , a processing module 702 and a sending module 703 .
[0181] The acquisition module 701 is used to acquire a first acquisition operation request, and the first acquisition operation request is used to request the target data source interface object to perform data acquisition. The acquisition module 701 is also used to respond to the first acquisition operation request and acquire the master-slave status of multiple target data areas where the target data source interface object is deployed, and the master-slave status is used to indicate whether the data area is a master data area or a slave data area. The processing module 702 is used to determine a first target acquisition node from multiple acquisition nodes based on the master-slave status of the multiple target data areas, and the target data area deployed by the first target acquisition node is the master data area. The sending module 703 is used to send a second acquisition request to the first target acquisition node, and the second acquisition request is used to instruct the target data source interface object to collect data.
[0182] Figure 8 8 is a schematic diagram of a structure of an interface object management device according to an exemplary embodiment. The interface object management device may include a processor 802, and the processor 802 is used to execute application code to implement the interface object management method in the present application.
[0183] The processor 802 may be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0184] like Figure 8 As shown, the interface object management device may further include a memory 803. The memory 803 is used to store application program codes for executing the solution of the present application, and the execution is controlled by the processor 802.
[0185] The memory 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 803 may exist independently and be connected to the processor 802 via the bus 804. The memory 803 may also be integrated with the processor 802.
[0186] like Figure 8 As shown, the management device of the interface object may further include a communication interface 801, wherein the communication interface 801, the processor 802, and the memory 803 may be coupled to each other, for example, via a bus 804. The communication interface 801 is used to perform information interaction with other devices, for example, to support information interaction between the management device of the interface object and other devices.
[0187] It should be pointed out that Figure 8 The device structure shown in the figure does not constitute a limitation on the management device of the interface object, except Figure 8 In addition to the components shown, the management device of the interface object may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0188] In actual implementation, the functions implemented by the processing unit can be Figure 8 The processor 802 shown calls the program code in the memory 803 to implement.
[0189] The present application also provides a computer-readable storage medium, on which instructions are stored, and when the instructions in the computer-readable storage medium are executed by a processor of a computer device, the computer can execute the management method of the interface object provided in the above-mentioned embodiment. For example, the computer-readable storage medium can be a memory 803 including instructions, and the above instructions can be executed by a processor 802 of a computer device to complete the above method. Optionally, the computer-readable storage medium can be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0190] Fig. 9 A conceptual partial view of a computer program product provided by an embodiment of the present application is schematically shown, where the computer program product includes a computer program for executing a computer process on a computing device.
[0191] In one embodiment, the computer program product is provided using a signal bearing medium 900. The signal bearing medium 900 may include one or more program instructions that, when executed by one or more processors, may provide the above-described Figure 2 , Figure 4 , Figure 5 Thus, for example, reference to Figure 2 In the embodiment shown in , one or more features of S201-S202 may be undertaken by one or more instructions associated with the signal bearing medium 900. In addition, Fig. 9 The program instructions in also describe example instructions.
[0192] In some examples, the signal bearing medium 900 may include a computer readable medium 901, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM) or a random access memory (RAM), and the like.
[0193] In some implementations, signal bearing medium 900 may include computer recordable medium 902 such as, but not limited to, memory, read / write (R / W) CD, R / W DVD, and the like.
[0194] In some implementations, signal bearing medium 900 may include communication medium 903 such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0195] The signal bearing medium 900 may be communicated by a wireless form of communication medium 903. The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.
[0196] In some examples, the management device of the interface object can be configured to provide various operations, functions, or actions in response to one or more program instructions in the computer-readable medium 901, the computer-recordable medium 902, and / or the communication medium 903.
[0197] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0198] In the several 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 modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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.
[0199] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0200] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0201] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes various media that can store program codes, such as-U disk, mobile hard disk, ROM, RAM, disk or CD.
[0202] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for managing an interface object, characterized in that: The first acquisition node in the data acquisition cluster is applied, each acquisition node in the data acquisition cluster is deployed with the same data area, the data area is used to deploy the data source interface object, and the data source interface object is used to collect data; The data source interface objects in the same data area of different acquisition nodes are the same; the method comprises: Acquire a master-slave status of a first data area of the first acquisition node, where the master-slave status is used to indicate whether a data area is a master data area or a slave data area; Based on the master-slave status of the first data area of the first acquisition node, the running status of the data source interface object in the first data area of the first acquisition node is determined; wherein the data source interface object in the master data area is in the running state, and the data source interface object in the slave data area is in the stopped running state.
2. The method according to claim 1, characterized in that The method further comprises: Acquire a state change request, where the state change request is used to instruct to change the master-slave state of the first data area of the first acquisition node; In response to the state change request, the first data area of the first acquisition node is changed to a master data area or a slave data area.
3. The method according to claim 2, characterized in that The obtaining state change request includes: receiving the state change request sent by the second collection node, where the state change request is determined based on the load information of each collection node and / or the working state of each collection node; or, The load information of each collection node and / or the working status of each collection node are acquired, and the state change request is generated based on the load information of each collection node and / or the working status of each collection node.
4. The method according to claim 1, characterized in that: The determining the operation state of the data source interface object in the first data area of the first acquisition node based on the master-slave state of the first data area of the first acquisition node includes: If the first data area of the first acquisition node is changed from the slave data area to the master data area, the data source interface object in the first data area of the first acquisition node is run; wherein the first data area of the second acquisition node is changed from the master data area to the slave data area; If the first data area of the first acquisition node is changed from the master data area to the slave data area, the data source interface object in the first data area of the first acquisition node is stopped; wherein the first data area of the second acquisition node is changed from the slave data area to the master data area.
5. The method according to any one of claims 1 to 4, characterized in that The first collection node and the second collection node are also deployed with a second data area; In the case where the first data area of the first acquisition node is the main data area, the second data area of the second acquisition node is the main data area; In the case where the second data area of the first acquisition node is the main data area, the first data area of the second acquisition node is the main data area.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Sending the master-slave status of the first data area of the first acquisition node to the management node in the data acquisition cluster; In the case where the first data area of the first collection node is a main data area, a first collection request sent by the management node is received, where the first collection request is used to instruct the data source interface object in the first data area to collect data.
7. The method according to claim 6, characterized in that The method further comprises: In the case where the first data area of the first acquisition node is a primary data area, receiving a first object management request sent by a management node in the data acquisition cluster, wherein the first object management request is used to request to perform a management operation on a data source interface object in the first data area; In response to the first object management request, performing the management operation on the data source interface object in the first data area of the first acquisition node; A synchronization request is sent to the second acquisition node, where the synchronization request is used to instruct to perform the management operation on the data source interface object in the first data area.
8. The method according to claim 6, characterized in that The method further comprises: In the case where the first data area of the first acquisition node is a slave data area and the first data area of the second acquisition node is a master data area, receiving a synchronization request sent by the second acquisition node, wherein the synchronization request is used to instruct to perform a management operation on a data source interface object in the first data area; In response to the synchronization request, the management operation is performed on the data source interface object in the first data area of the first acquisition node.
9. A method for managing an interface object, characterized in that: Applied to a management node in a data collection cluster, each collection node of the data collection cluster is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; The data source interface objects in the same data area of different acquisition nodes are the same; the method comprises: Obtaining a first acquisition operation request, where the first acquisition operation request is used to request a target data source interface object to perform data acquisition; In response to the first acquisition operation request, acquiring a master-slave status of multiple target data areas where the target data source interface object is deployed, the master-slave status being used to indicate whether a data area is a master data area or a slave data area; Based on the master-slave status of the multiple target data areas, determining a first target acquisition node from the multiple acquisition nodes, the target data area deployed by the first target acquisition node being the master data area; A second acquisition request is sent to the first target acquisition node, where the second acquisition request is used to instruct the target data source interface object to acquire data.
10. A method for managing an interface object, characterized in that: Applied to a data collection cluster, the data collection cluster includes multiple collection nodes and management nodes, each collection node is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; The data source interface objects in the same data area of different acquisition nodes are the same; the method comprises: The management node obtains a first acquisition operation request, where the first acquisition operation request is used to request a target data source interface object to perform data acquisition; In response to the first acquisition operation request, the management node obtains a master-slave status of multiple target data areas where the target data source interface object is deployed, the master-slave status being used to indicate whether a data area is a master data area or a slave data area; The management node determines a first target acquisition node from the multiple acquisition nodes based on the master-slave status of the multiple target data areas, and the target data area deployed by the first target acquisition node is the master data area; The management node sends a second acquisition request to the first target acquisition node, where the second acquisition request is used to instruct the target data source interface object to acquire data; In response to the second acquisition request, the first target acquisition node acquires data through a target data source interface object in a target data area of the first target acquisition node.
11. A management device for an interface object, characterized in that: The first acquisition node in the data acquisition cluster is applied, each acquisition node in the data acquisition cluster is deployed with the same data area, the data area is used to deploy the data source interface object, and the data source interface object is used to collect data; The data source interface objects in the same data area of different acquisition nodes are the same; the device comprises: An acquisition module, used for acquiring a state change request, where the state change request is used for instructing to change the first data area of the first acquisition node to a master data area or a slave data area; A processing module is used to change the first data area of the first acquisition node to a master data area or a slave data area in response to the state change request; wherein the data source interface object in the master data area is in a running state, and the data source interface object in the slave data area is in a stopped state.
12. A management device for an interface object, characterized in that: Applied to a management node in a data collection cluster, each collection node of the data collection cluster is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; The data source interface objects in the same data area of different acquisition nodes are the same; the device comprises: An acquisition module, used to acquire a first acquisition operation request, where the first acquisition operation request is used to request a target data source interface object to perform data acquisition; The acquisition module is further used to, in response to the first acquisition operation request, acquire the master-slave status of multiple target data areas where the target data source interface object is deployed, wherein the master-slave status is used to indicate whether a data area is a master data area or a slave data area; A processing module, configured to determine a first target acquisition node from a plurality of acquisition nodes based on the master-slave status of the plurality of target data areas, wherein the target data area deployed by the first target acquisition node is the master data area; The sending module is used to send a second acquisition request to the first target acquisition node, where the second acquisition request is used to instruct the target data source interface object to acquire data.
13. A management system for interface objects, characterized in that: The system includes multiple collection nodes and management nodes, each collection node is deployed with the same data area, the data area is used to deploy a data source interface object, and the data source interface object is used to collect data; The data source interface objects in the same data area of different acquisition nodes are the same; The management node is used to obtain a first acquisition operation request, where the first acquisition operation request is used to request a target data source interface object to perform data acquisition; The management node is used to obtain, in response to the first acquisition operation request, a master-slave status of multiple target data areas where the target data source interface object is deployed, wherein the master-slave status is used to indicate whether a data area is a master data area or a slave data area; The management node is used to determine a first target acquisition node from multiple acquisition nodes based on the master-slave status of the multiple target data areas, and the target data area deployed by the first target acquisition node is the master data area; The management node is used to send a second acquisition request to the first target acquisition node, where the second acquisition request is used to instruct the target data source interface object to collect data; The first target acquisition node is used to respond to the second acquisition request, and the first target acquisition node acquires data through a target data source interface object in a target data area of the first target acquisition node.
14. A management device for an interface object, characterized in that: include: Processor and memory; The processor is coupled to the memory; The memory is used to store one or more programs, and one or more of the programs include computer execution instructions. When the management device of the interface object is running, the processor executes the computer execution instructions stored in the memory to enable the management device of the interface object to perform the method as described in any one of claims 1-10.
