Method and device for updating configuration information, equipment, medium and program product
By setting up a subscribeable communication channel in the server, the configuration information of the terminal device is updated online synchronously, solving the problems of business interruption and low update efficiency caused by device restart in traditional methods, and significantly improving the efficiency of configuration information update.
Patent Information
- Application Number
- CN202510007768.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the power industry and other fields, the configuration information update of terminal equipment usually requires restarting the device, resulting in business interruption, and traditional methods are difficult to achieve synchronous update of configuration information between multiple terminal equipment, which is inefficient in update efficiency.
By setting up multiple subscribeable communication channels in the server, the functional module can subscribe to the target channel to establish a communication connection with the server. When the configuration information changes, the server synchronously sends a notification message to the subscribed functional module through the target channel. The functional module obtains the changed configuration information from the server and updates its own configuration information.
The configuration information of multiple functional modules is synchronized online, without manual operation or restart, which significantly improves the efficiency of configuration information update.
Smart Images

Figure CN119420649A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a method, apparatus, device, medium and program product for updating configuration information. Background Art
[0002] In the power industry and many other fields, the configuration information management of terminal devices is a key link to ensure their normal operation and efficient maintenance. When updating the configuration information of terminal devices, the method of uploading the new configuration information file to the terminal device to be updated and restarting the device to apply the new configuration information is usually adopted. However, since this method requires restarting the device, the device will be unable to perform its original functions during the update, that is, the original business of the device will be interrupted, affecting the normal operation of the device.
[0003] Secondly, in large-scale networks, a large number of distributed terminal devices are often involved. The traditional method requires file upload and restart operations for each device one by one, which makes it difficult to achieve synchronous update of configuration information between multiple terminal devices and has low update efficiency. Summary of the invention
[0004] The present application provides a method, apparatus, device, medium and program product for updating configuration information, which can not only realize the online synchronous update of configuration information of multiple different functional modules; but also do not require manual operation or restart operation during the configuration information update process, which can significantly improve the efficiency of configuration information update and avoid problems in traditional update solutions.
[0005] The present application provides a method for updating configuration information, which is applied to a server, wherein the server stores configuration information of multiple different functional modules, wherein the functional modules are arranged in at least one terminal device, and different functional modules are used to implement different functions of the terminal device, and the server provides multiple subscribable communication channels, and each of the functional modules establishes a communication connection with the server by subscribing to at least one communication channel among the multiple subscribable communication channels; the method comprises: In the case where it is determined that the configuration information has changed, determining the type of the changed configuration information; Determining, according to a correspondence between a preset type of configuration information and a communication channel, a target communication channel matching the type of the changed configuration information, wherein the target communication channel is at least one of the multiple subscribable communication channels; Through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
[0006] According to a method for updating configuration information provided by the present application, the functional module is a process running in the memory of the terminal device.
[0007] According to a method for updating configuration information provided by the present application, a configuration modification module is provided in the server, and the configuration modification module is used to modify the configuration information in the server; and determining that the configuration information has changed includes: If a message generated by the configuration modification module indicating that the configuration information is successfully modified is detected, it is determined that the configuration information is changed.
[0008] According to a method for updating configuration information provided by the present application, all functional modules that have subscribed to the target communication channel include a first functional module, and the first functional module is any functional module among all functional modules that have subscribed to the target communication channel. After synchronously sending a notification message indicating that the configuration information has changed to all functional modules that have subscribed to the target communication channel, the method further includes: receiving a request for acquiring the changed configuration information sent by the first functional module in response to the notification message; In response to the request, the configuration information of the first functional module is sent to the first functional module through a data transmission channel pre-negotiated with the first functional module.
[0009] According to a method for updating configuration information provided by the present application, the server is a remote dictionary server, a remote dictionary service database is provided in the server, and the remote dictionary service database is used to store the configuration information of the multiple different functional modules.
[0010] The present application also provides a method for updating configuration information, which is applied to a second functional module in a terminal device, wherein the second functional module establishes a communication connection with the server through at least one communication channel among a plurality of subscribable communication channels provided by the subscription server, wherein the configuration information of a plurality of different functional modules is stored in the server, and the second functional module is any one of the plurality of different functional modules, and different functional modules are used to implement different functions of the terminal device; the method comprises: receiving a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; In response to the notification message, obtaining the changed configuration information from the server; The own configuration information is updated according to the changed configuration information.
[0011] The present application also provides a device for updating configuration information, which is applied to a server, wherein the server stores configuration information of multiple different functional modules, wherein the functional modules are arranged in at least one terminal device, and different functional modules are used to implement different functions of the terminal device, wherein the server provides multiple subscribable communication channels, and each of the functional modules establishes a communication connection with the server by subscribing to at least one communication channel among the multiple subscribable communication channels; the device comprises: A first determining module, configured to determine the type of the changed configuration information when it is determined that the configuration information has changed; A second determination module is used to determine a target communication channel that matches the type of the changed configuration information according to a correspondence between the preset configuration information type and the communication channel, wherein the target communication channel is at least one communication channel among the multiple subscribable communication channels; The first sending module is used to synchronously send a notification message indicating that the configuration information has changed to all functional modules that have subscribed to the target communication channel through the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
[0012] The present application also provides another device for updating configuration information, which is applied to a second functional module in a terminal device, wherein the second functional module establishes a communication connection with the server through at least one communication channel among a plurality of subscribable communication channels provided by the subscription server, wherein the configuration information of a plurality of different functional modules is stored in the server, and the second functional module is any one of the plurality of different functional modules, and different functional modules are used to implement different functions of the terminal device; the device comprises: a second receiving module, configured to receive a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; An acquisition module, configured to respond to the notification message and acquire the changed configuration information from the server; The update module is used to update its own configuration information according to the changed configuration information.
[0013] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method for updating configuration information as described in any one of the above is implemented.
[0014] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a method for updating configuration information as described in any one of the above is implemented.
[0015] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method for updating configuration information as described in any one of the above is implemented.
[0016] The present application provides a method, apparatus, device, medium and program product for updating configuration information. The configuration information updating method of the present application is implemented. When it is determined that the configuration information in the database has changed, the type of the changed configuration information is determined; then, according to the correspondence between the preset type of the configuration information and the communication channel, a target channel matching the type of the changed configuration information is determined, and the target channel is at least one of the multiple subscribable communication channels; then, through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the database, and update their own configuration information according to the changed configuration information. The method of the present application includes at least the following technical effects: first, the server supports a subscription and publishing mechanism, and can immediately notify each subscribed functional module after determining that the configuration information has changed, thereby realizing online synchronous update of the configuration information of multiple different functional modules; second, since a one-to-many update effect can be automatically achieved (i.e., a notification message is sent once, and multiple functional modules are synchronously updated online), there is no need for manual operation, interruption of operation, or restart and other operations to ensure that all functional modules work under the latest configuration information (i.e., the changed configuration information automatically takes effect after being read by the functional module), so the efficiency of updating the configuration information can be significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a flow chart of a method for updating configuration information shown in an embodiment of the present application; Figure 2 This is a schematic diagram of a connection relationship between a server and a terminal device shown in an embodiment of the present application; Figure 3 is a structural diagram of a device for updating configuration information shown in an embodiment of the present application; Figure 4 is a structural diagram of another device for updating configuration information shown in an embodiment of the present application; Figure 5 It is a schematic diagram of the physical structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] The present application provides a method for updating configuration information, which is applied to a server, wherein the configuration information of multiple different functional modules is stored in the server. The functional module is set in at least one terminal device, and one terminal device includes at least one functional module among multiple functional modules, and different functional modules are used to implement different functions of the terminal device. The server provides multiple subscribable communication channels, and each functional module establishes a communication connection with the server by subscribing to at least one communication channel among the multiple subscribable communication channels.
[0021] The server supports a subscription publishing mechanism, which allows the publisher (server) to send messages to a specified communication channel, and all receivers (functional modules) that have subscribed to the communication channel will receive the published message. This subscription publishing mechanism can achieve asynchronous and decoupled message delivery.
[0022] Specifically, a database is provided in the server, and the database is used to store configuration information of a plurality of different functional modules.
[0023] Figure 1 1 is a flow chart of a method for updating configuration information shown in an embodiment of the present application. Figure 1 The method of the present application specifically comprises the following steps: Step 101: When it is determined that configuration information has changed, determine the type of the changed configuration information.
[0024] In this embodiment, the function module is a software module in the terminal device, and different function modules are used to implement different functions in the terminal device. For example, the terminal device includes function module 1 and function module 2, function module 1 is used to implement data monitoring, and function module 2 is used to implement security protection, etc.
[0025] The terminal device may be any type of device. For example, it may be power equipment in the power industry, including smart meters, substation integrated automation systems, distribution automation terminals, distributed energy access equipment, power communication network equipment (routers, switches, optical transmission equipment, etc.), etc. It may also be equipment in other industries that require configuration information update. The type of terminal device may be set according to actual needs, and this embodiment does not impose specific restrictions on this.
[0026] In step 101, the server may detect whether the configuration information in the database has changed by any method, and once a change is detected, the server immediately determines the type of the changed configuration information.
[0027] In this embodiment, the functional module is a functional module currently running in the memory of the terminal device.
[0028] Step 102: According to the correspondence between the preset configuration information type and the communication channel, determine a target channel that matches the type of the changed configuration information, where the target channel is at least one communication channel among a plurality of subscribable communication channels.
[0029] In this embodiment, a correspondence table between the types of configuration information and the communication channels is pre-stored in the server, and the correspondence table reflects the correspondence between the types of various configuration information and different subscribable communication channels.
[0030] Among them, the configuration information can be pre-divided into multiple data items, each data item can be further divided into multiple data sub-items, and the specific division standard can be set according to actual needs. Therefore, multiple types of configuration information in the same functional module can be set according to the division of the configuration information. For example, the types of configuration information in functional module X may include: terminal device A-functional module X-data item 1, terminal device A-functional module X-data item 2, ... terminal device A-functional module X-data item N, and terminal device A is the terminal device where functional module X is located.
[0031] Therefore, when the correspondence table is generated in advance, corresponding communication channels can be set for different types of configuration information of each functional module. In this way, after determining the changed configuration information, the corresponding communication channel can be quickly queried in the correspondence table according to the type of the changed configuration information.
[0032] In this embodiment, the target channel may be one communication channel or multiple communication channels.
[0033] For example, if the configuration information that has been changed includes the content in data item 2 of terminal device A-function module X, and the content in data item 1 of terminal device B-function module X, and the communication channel corresponding to terminal device A-function module X-data item 2 is communication channel 1, and the communication channel corresponding to terminal device B-function module X-data item 1 is communication channel 2, then the target communication channels are communication channel 1 and communication channel 2.
[0034] Step 103: synchronously send a notification message indicating that configuration information has changed to all functional modules that have subscribed to the target communication channel through the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the database and update their own configuration information according to the changed configuration information.
[0035] Execute step 103, the server publishes a notification message of configuration information change to the target communication channel, so that all functional modules that have subscribed to the target channel can synchronously receive the notification message, and then when the configuration information is known to have changed, according to a pre-set update function (the update function enables the functional module to immediately access the server to obtain the latest configuration information when receiving the notification message of configuration information change), the changed configuration information can be immediately obtained from the database, and its own configuration information can be quickly updated according to the changed configuration information, thereby finally realizing synchronous online update of configuration information of multiple different functional modules.
[0036] For example, after the configuration information in a database is modified, it is determined that the notification message needs to be published to communication channel 1 and communication channel 3 according to the type of the changed configuration information. Then, the server sends the notification message to all functional modules that have subscribed to communication channel 1 in advance through communication channel 1, and sends it to all functional modules that have subscribed to communication channel 2 in advance through communication channel 2. Usually, through this subscription and publication mode, all functional modules that have subscribed to communication channel 1 and all functional modules that have subscribed to communication channel 2 can receive the notification message at the same time. Therefore, all functional modules that receive the notification message can immediately obtain the changed configuration information from the database, and update their own configuration information according to the changed configuration information, so that their own configuration information is always consistent with the database.
[0037] In the related art, since it is impossible to achieve synchronous online update of configuration information of multiple different functional modules (or devices), some functional modules (or devices) use old configuration information, while some functional modules (or devices) use new configuration information, which affects the normal execution of the business. Therefore, it is necessary to ensure that all functional modules (or devices) are running under the latest configuration information through manual operation, interruption of functional modules (or devices) or restart and other operations. In the present application, since it is possible to achieve synchronous online update of configuration information of multiple different functional modules (or devices), each functional module can update its own configuration information without interruption, stoppage or restart after obtaining the changed configuration information. In other words, the changed configuration information can take effect immediately after being read by the functional module, without pausing the operation of the functional module, ending the operation of the functional module, restarting the functional module, or requiring external manual intervention.
[0038] The configuration information updating method of the present application is implemented. When it is determined that the configuration information has changed, the type of the changed configuration information is determined; then, according to the correspondence between the preset type of configuration information and the communication channel, the target channel matching the type of the changed configuration information is determined; then, through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the database, and update their own configuration information according to the changed configuration information. The method of the present application includes at least the following technical effects: first, the server supports the subscription and publishing mechanism, and can immediately notify each subscribed functional module after determining that the configuration information has changed, thereby realizing the online synchronous update of the configuration information of multiple different functional modules; second, since the one-to-many update effect can be automatically realized (i.e., the sending of a notification message once, the synchronous online update of multiple functional modules), there is no need for manual operation, interruption of operation or restart and other operations to ensure that all functional modules work under the latest configuration information (i.e., the changed configuration information automatically takes effect after being read by the functional module), so the configuration information update efficiency can be significantly improved.
[0039] In combination with the above embodiments, in one implementation, the server may specifically be a remote dictionary server (remote dictionary server, redis), the database may specifically be a remote dictionary service database, and the server provides a variety of subscribable communication channels through a publish-subscribe mechanism supported by remote dictionary service technology.
[0040] The Remote Dictionary Service Database is an open source, in-memory data structure storage system that can be used as a database, cache, and message middleware. The Remote Dictionary Service Database has the following features: (1) Memory storage: Data is stored in memory, so it has a faster read and write speed; (2) Persistence: It supports two persistence modes, namely RDB snapshot and AOF log, which can persist data in memory to disk to ensure data security and reliability; (3) Rich data types: It supports a variety of data types, including strings, hashes, lists, sets, ordered sets, etc., which can meet data storage requirements in different scenarios; (4) Atomicity: All operations are atomic, which ensures data consistency and integrity.
[0041] In this implementation, the remote dictionary service database implements data storage, retrieval and management through various data structures and functions provided by the redis server. The redis server provides a variety of subscribeable communication channels to the outside world through the publish-subscribe mechanism provided by the remote dictionary service technology.
[0042] In summary, this embodiment has at least the following effects: First, in the remote dictionary server, the remote dictionary service database adopts a key-value storage mode, so when new configuration information needs to be added, only a new key-value pair needs to be added, which is simple to operate and has low maintenance costs; Second, since the remote dictionary service database is a memory database, the configuration information of all functional modules is stored in the memory space of the server, so it can quickly respond to the access request of the functional module for the configuration information, ensuring that the configuration information takes effect quickly after being acquired by the functional module; Third, the remote dictionary service technology supports a subscription and publishing mechanism, which can help the server to realize online synchronous update of the configuration information of multiple different functional modules.
[0043] In combination with the above embodiments, in one implementation manner, the functional module is a process running in the memory of the terminal device.
[0044] In this embodiment, the functional module may be a running process instance. After receiving a notification message from the server that the configuration information has changed, the process immediately reads the latest configuration information in the database, and the latest configuration information can take effect without any manual intervention or restart operation. In other words, after receiving the notification message, the process that has subscribed to the communication channel of the server will automatically obtain the latest configuration information and apply it to the currently running process, thereby ensuring that the configuration information takes effect immediately and avoiding interruption or restart of the device.
[0045] In combination with the above embodiments, in one implementation manner, a configuration modification module is further provided in the server, and the configuration modification module is used to modify the configuration information in the database.
[0046] Accordingly, it is determined that the configuration information has changed, including: If a message indicating that the configuration information has been successfully modified, generated by the configuration modification module, is detected, it is determined that the configuration information has been changed.
[0047] After completing the modification of the configuration information, the configuration modification module will generate a prompt of successful modification. After the server detects the prompt, it can be determined that the configuration information in the database has changed. In this embodiment, in addition to being integrated into the server, the configuration modification module can also be a separate application independent of the server, and can be specifically set according to actual needs. When the configuration modification module is an independent application, after completing the modification of the configuration information, the configuration modification module will send a prompt of successful modification to the server. After the server detects the prompt, it can be understood that the configuration information in the database has changed.
[0048] In combination with the above embodiments, in one implementation manner, all functional modules that have subscribed to the target communication channel include a first functional module, and after synchronously sending a notification message indicating that the configuration information has changed to all functional modules that have subscribed to the target communication channel, the method of the present application further includes: receiving a request for obtaining changed configuration information sent by the first functional module in response to the notification message; In response to the request, the configuration information of the first functional module is sent to the first functional module through the data transmission channel negotiated in advance with the first functional module.
[0049] In this embodiment, the first functional module may be any one of all functional modules that have subscribed to the target communication channel. In other words, all functional modules that have subscribed to the target communication channel may read the latest configuration information from the server in the above manner.
[0050] In this embodiment, each functional module establishes a communication connection with the server by subscribing to a communication channel, but the communication channel is unidirectional, that is, the server is only responsible for publishing notification messages to the communication channel, and does not care which functional modules have subscribed to the communication channel.
[0051] Therefore, in this embodiment, when the first functional module needs to read the changed configuration information from the database, that is, when the first functional module needs to actively access the database in the server, it is necessary to quickly obtain the changed configuration information through other data transmission channels negotiated in advance with the server. At this time, the first functional module can send a request for data reading to the server, and the server responds to the request and returns the corresponding new configuration information to the first functional module. The above is an explanation of the configuration information updating method of the present application from the server side, and the following will explain the configuration information updating method of the present application from the functional module side.
[0052] The present application also provides another method for updating configuration information, which is applied to a second functional module in a terminal device, wherein the second functional module establishes a communication connection with a server through at least one communication channel among a plurality of subscribable communication channels provided by the subscription server, and the server stores configuration information of a plurality of different functional modules, wherein the second functional module may be any one functional module, and different functional modules are used to implement different functions of the terminal device, and the method comprises: A notification message indicating that the configuration information has changed is sent by the receiving server through the communication channel subscribed by the second functional module (i.e., a notification message indicating that the configuration information has changed is sent by the redis server to the second functional module through the communication channel subscribed by the second functional module); the communication channel subscribed by the second functional module includes at least one communication channel in the target communication channel, and the target communication channel is determined by the server according to the type of the changed configuration information and the preset correspondence between the type of configuration information and the communication channel when determining that the configuration information has changed; In response to the notification message, obtain the changed configuration information from the server; According to the changed configuration information, the configuration information of the function module is updated. In this embodiment, after obtaining the changed configuration information, the function module updates its own configuration information without interruption, stopping, or restarting, that is, the changed configuration information can take effect immediately after being read by the function module, without pausing the operation of the function module, ending the operation of the function module, restarting the function module, or requiring external manual intervention. On the one hand, online synchronous update of the configuration information of multiple different function modules is realized; on the other hand, the changed configuration information automatically takes effect after being read by the function module, without manual operation or restarting operation, etc., which significantly improves the efficiency of configuration information update.
[0053] For other descriptions about the server and the functional modules, please refer to the above text, which will not be elaborated in this embodiment.
[0054] In combination with the above embodiments, in one implementation, obtaining the changed configuration information from the database may include: The changed configuration information is read from the database through a data transmission channel pre-negotiated with the server, and the data transmission channel is different from the communication channel subscribed by the functional module on the server.
[0055] In this embodiment, when the functional module needs to actively access the database in the server, it needs to quickly obtain the changed configuration information through other data transmission channels pre-negotiated with the server. For specific instructions, please refer to the above description.
[0056] Figure 2 1 is a schematic diagram of a connection relationship between a server and a terminal device shown in an embodiment of the present application. Figure 2 In the figure, M terminal devices and N functional modules are shown, where M is smaller than N. In the specific implementation, the specific values of M and N can be set according to actual needs. Figure 2 , the configuration information updating method of the present application is described in detail with a specific embodiment. Figure 2In , the configuration modification module is located in the server.
[0057] Step 1: After the staff modifies the configuration information in the database through the configuration modification module, a message indicating that the configuration information is successfully modified is generated; Step 2: After the server detects the message that the modification is successful, it determines that the configuration information in the database has been changed; Step 3: The server determines the type of the changed configuration information, and determines a target channel matching the type of the changed configuration information according to a preset correspondence table between the type of configuration information and the communication channel; Step 4: The server publishes a notification message indicating that the configuration information has changed to the target channel, so that all functional modules that have subscribed to the target communication channel can receive the notification message at the same time; Step 5: After receiving the notification message, each functional module responds to the notification message and sends a request to the server to obtain the changed configuration information through the data transmission channel pre-negotiated with the server; Step 6: After receiving the request from each functional module, the server responds to the request, obtains the changed configuration information from the database, and sends it to the functional module through the data transmission channel. For example, the server responds to the request sent by functional module 1, obtains the configuration information required by functional module 1 from the database, and sends it to functional module 1; Step 7: After receiving the changed configuration information, each functional module updates its own configuration information without interrupting, stopping or restarting itself. For example, after receiving the changed configuration information, functional module 1 updates its own configuration information without interrupting, stopping or restarting itself.
[0058] In summary, the method of this application has at least the following technical effects: First, the server supports a subscription publishing mechanism, which can immediately notify each subscribed functional module when the configuration information is determined to have changed, thereby realizing online synchronous update of the configuration information of multiple different functional modules; Second, since the one-to-many update effect can be automatically achieved (i.e., a notification message is sent once, and multiple functional modules are updated online synchronously), there is no need for manual operations, interruption of operation, or restart to ensure that all functional modules work under the latest configuration information (i.e., the changed configuration information automatically takes effect after being read by the functional module), thus significantly improving the efficiency of configuration information update; Third, the database can use a remote dictionary service database. Since the remote dictionary service database is an in-memory database, the configuration information of all functional modules is stored in the memory space of the server. Therefore, it can quickly respond to the access request of the functional module for the configuration information, ensuring that the configuration information takes effect in real time after being obtained by the functional module.
[0059] The method of the present application can be used not only in scenarios where configuration information is updated, but also in other scenarios where multiple different data need to be updated synchronously, and can be specifically configured according to actual needs.
[0060] The following is a description of an apparatus for updating configuration information provided in the present application. The apparatus for updating configuration information described below and the method for updating configuration information described above can refer to each other.
[0061] The present application provides an apparatus 300 for updating configuration information, which is applied to a server, wherein the server stores configuration information of multiple different functional modules, wherein the functional modules are arranged in at least one terminal device, and different functional modules are used to implement different functions of the terminal device. The server provides multiple subscribable communication channels, and each of the functional modules establishes a communication connection with the server by subscribing to at least one of the multiple subscribable communication channels. Figure 3 is a schematic diagram of a structure of a device for updating configuration information according to an embodiment of the present application. Figure 3 , the device 300 comprises: A first determining module 301 is used to determine the type of the changed configuration information when it is determined that the configuration information has changed; A second determination module 301 is used to determine a target communication channel that matches the type of the changed configuration information according to a correspondence between the preset configuration information type and the communication channel, wherein the target communication channel is at least one of the multiple subscribable communication channels; The first sending module 303 is used to synchronously send a notification message indicating that the configuration information has changed to all functional modules that have subscribed to the target communication channel through the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
[0062] According to a device for updating configuration information provided by the present application, the functional module is a process running in the memory of the terminal device.
[0063] According to a device for updating configuration information provided by the present application, a configuration modification module is provided in the server, and the configuration modification module is used to modify the configuration information in the server; the first determination module 301 includes: The determination submodule is used to determine that the configuration information has been changed if a message indicating that the configuration information has been successfully modified, generated by the configuration modification module, is detected.
[0064] According to a device for updating configuration information provided by the present application, all functional modules that have subscribed to the target communication channel include a first functional module, and the first functional module is any functional module among all functional modules that have subscribed to the target communication channel. The device 300 also includes: A first receiving module, configured to receive a request for acquiring the changed configuration information sent by the first functional module in response to the notification message; The second sending module is used to respond to the request and send the configuration information of the first functional module to the first functional module through the data transmission channel pre-negotiated with the first functional module.
[0065] According to a device for updating configuration information provided by the present application, the server is a remote dictionary server, a remote dictionary service database is provided in the server, and the remote dictionary service database is used to store the configuration information of the multiple different functional modules.
[0066] The present application provides another device 400 for updating configuration information, which is applied to a second functional module in a terminal device, wherein the second functional module establishes a communication connection with the server through at least one communication channel among a plurality of subscribable communication channels provided by the subscription server, wherein the configuration information of a plurality of different functional modules is stored in the server, and the second functional module is any one of the plurality of different functional modules, and different functional modules are used to implement different functions of the terminal device.
[0067] Figure 4 FIG. 1 is a schematic diagram of another device for updating configuration information according to an embodiment of the present application. Figure 4 , the device 400 comprises: The second receiving module 401 is used to receive a notification message indicating that the configuration information has changed, which is sent by the server through the communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in the target communication channel, and the target communication channel is determined by the server according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel when determining that the configuration information has changed; An acquisition module 402 is used to respond to the notification message and acquire the changed configuration information from the server; The updating module 403 is used to update its own configuration information according to the changed configuration information.
[0068] Figure 5 FIG. 1 is a schematic diagram of the physical structure of an electronic device shown in an embodiment of the present application. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute a method for updating configuration information, the method comprising: In the case where it is determined that the configuration information has changed, determining the type of the changed configuration information; Determining, according to a correspondence between a preset type of configuration information and a communication channel, a target communication channel matching the type of the changed configuration information, wherein the target communication channel is at least one of the multiple subscribable communication channels; Through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
[0069] Alternatively, the processor 510 may call the logic instructions in the memory 530 to execute another method for updating configuration information, the method comprising: receiving a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; In response to the notification message, obtaining the changed configuration information from the server; The own configuration information is updated according to the changed configuration information.
[0070] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0071] On the other hand, the present application further provides a computer program product, the computer program product comprising a computer program, the computer program may be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute a method for updating configuration information provided above, the method comprising: In the case where it is determined that the configuration information has changed, determining the type of the changed configuration information; Determining, according to a correspondence between a preset type of configuration information and a communication channel, a target communication channel matching the type of the changed configuration information, wherein the target communication channel is at least one of the multiple subscribable communication channels; Through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
[0072] Alternatively, when the computer program is executed by a processor, the computer can execute another method for updating configuration information provided above, the method comprising: receiving a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; In response to the notification message, obtaining the changed configuration information from the server; The own configuration information is updated according to the changed configuration information.
[0073] In another aspect, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a method for updating configuration information provided by the above methods is implemented, the method comprising: In the case where it is determined that the configuration information has changed, determining the type of the changed configuration information; Determining, according to a correspondence between a preset type of configuration information and a communication channel, a target communication channel matching the type of the changed configuration information, wherein the target communication channel is at least one of the multiple subscribable communication channels; Through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
[0074] Alternatively, when the computer program is executed by a processor, another method for updating configuration information provided by the above methods is implemented, and the method includes: receiving a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; In response to the notification message, obtaining the changed configuration information from the server; The own configuration information is updated according to the changed configuration information.
[0075] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for updating configuration information, characterized in that: Applied to a server, the server stores configuration information of multiple different functional modules, the functional modules are arranged in at least one terminal device, different functional modules are used to implement different functions of the terminal device, the server provides multiple subscribable communication channels, each of the functional modules establishes a communication connection with the server by subscribing to at least one communication channel among the multiple subscribable communication channels; the method comprises: In the case where it is determined that the configuration information has changed, determining the type of the changed configuration information; Determining, according to a correspondence between a preset type of configuration information and a communication channel, a target communication channel matching the type of the changed configuration information, wherein the target communication channel is at least one of the multiple subscribable communication channels; Through the target communication channel, a notification message indicating that the configuration information has changed is synchronously sent to all functional modules that have subscribed to the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
2. The method according to claim 1, characterized in that The server is provided with a configuration modification module, and the configuration modification module is used to modify the configuration information in the server; the determining that the configuration information has been changed includes: If a message generated by the configuration modification module indicating that the configuration information is successfully modified is detected, it is determined that the configuration information is changed.
3. The method according to claim 1, characterized in that: All the functional modules that have subscribed to the target communication channel include a first functional module, and the first functional module is any functional module among all the functional modules that have subscribed to the target communication channel. After synchronously sending a notification message indicating that the configuration information has changed to all the functional modules that have subscribed to the target communication channel, the method further includes: receiving a request for acquiring the changed configuration information sent by the first functional module in response to the notification message; In response to the request, the configuration information of the first functional module is sent to the first functional module through a data transmission channel pre-negotiated with the first functional module.
4. The method according to any one of claims 1 to 3, characterized in that: The server is a remote dictionary server, and a remote dictionary service database is provided in the server. The remote dictionary service database is used to store configuration information of the multiple different functional modules.
5. A method for updating configuration information, characterized in that: A second functional module applied to a terminal device, wherein the second functional module establishes a communication connection with the server through at least one communication channel among a plurality of subscribable communication channels provided by the subscription server, wherein the configuration information of a plurality of different functional modules is stored in the server, wherein the second functional module is any one of the plurality of different functional modules, and different functional modules are used to implement different functions of the terminal device; the method comprising: receiving a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module, wherein the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; In response to the notification message, obtaining the changed configuration information from the server; The own configuration information is updated according to the changed configuration information.
6. A device for updating configuration information, characterized in that: Applied to a server, the server stores configuration information of multiple different functional modules, the functional modules are arranged in at least one terminal device, different functional modules are used to implement different functions of the terminal device, the server provides multiple subscribable communication channels, each of the functional modules establishes a communication connection with the server by subscribing to at least one communication channel among the multiple subscribable communication channels; the device comprises: A first determining module, configured to determine the type of the changed configuration information when it is determined that the configuration information has changed; A second determination module is used to determine a target communication channel that matches the type of the changed configuration information according to a correspondence between the preset configuration information type and the communication channel, wherein the target communication channel is at least one communication channel among the multiple subscribable communication channels; The first sending module is used to synchronously send a notification message indicating that the configuration information has changed to all functional modules that have subscribed to the target communication channel through the target communication channel, so as to prompt the functional modules that have received the notification message to obtain the changed configuration information from the server and update their own configuration information according to the changed configuration information.
7. A device for updating configuration information, characterized in that: A second functional module applied to a terminal device, the second functional module establishes a communication connection with the server through at least one communication channel among a plurality of subscribable communication channels provided by the subscription server, the configuration information of a plurality of different functional modules is stored in the server, the second functional module is any one of the plurality of different functional modules, and different functional modules are used to implement different functions of the terminal device; the apparatus comprises: a second receiving module, configured to receive a notification message indicating that the configuration information has changed, sent by the server through a communication channel subscribed by the second functional module; the communication channel subscribed by the second functional module includes at least one communication channel in a target communication channel, and the target communication channel is determined by the server, when determining that the configuration information has changed, according to the type of the changed configuration information and the correspondence between the preset configuration information type and the communication channel; An acquisition module, configured to respond to the notification message and acquire the changed configuration information from the server; The update module is used to update its own configuration information according to the changed configuration information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements a method for updating configuration information as described in any one of claims 1 to 4, or implements a method for updating configuration information as described in claim 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements a method for updating configuration information as claimed in any one of claims 1 to 4, or implements a method for updating configuration information as claimed in claim 5.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a method for updating configuration information as claimed in any one of claims 1 to 4, or implements a method for updating configuration information as claimed in claim 5.
Citation Information
Patent Citations
Method, apparatus and system for updating configuration information
CN105515872A
Visual operation-maintenance module information interaction system and method of intelligent transformation substation secondary equipment
CN107995051A
Method and device for configuring network access apparatus
WO2017211091A1
Hosting system for scenarios and configurations in power system, and hosting method
WO2024032298A1