Information synchronization method and device, computer equipment and storage medium
By deploying port listeners and log parsers in the license server, monitoring and analyzing license flow requests in real time and synchronizing accurate license idle information, the problem of low accuracy of license idle information in the existing technology is solved, and the utilization rate of license resources and the reliability of task scheduling is improved.
Patent Information
- Application Number
- CN202411824765.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, the accuracy of the license idle information synchronized to each cluster is low, resulting in a decrease in the utilization rate of license resources.
By deploying a port listener and a log parser in the license server, the license flow requests of each cluster are monitored in real time, and the license information in the log file is analyzed through the log parser, the target license idle information of the application to be licensed is determined, and the information is synchronized to each cluster.
It improves the accuracy of synchronized licensed idle information to each cluster, enhances the utilization rate of license resources, and provides reliable information support for task scheduling.
Smart Images

Figure CN119946070A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information synchronization method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, there are more and more highly complex and high-density tasks. In order to improve the efficiency of task processing, such tasks are often assigned to at least one cluster and processed in parallel by task processing applications deployed in each cluster.
[0003] In actual applications, when the task processing application is running, the application license server needs to perform license authorization. In the related art, when the license server performs license authorization, it usually synchronizes different license idle information pre-allocated to each cluster to each cluster, so that each cluster obtains the corresponding license authorization according to the corresponding license idle information when using the task processing application.
[0004] However, the accuracy of the license idle information synchronized to each cluster in the related art is low, resulting in reduced utilization of license resources. Summary of the invention
[0005] Based on this, it is necessary to provide an information synchronization method, apparatus, computer equipment and storage medium to address the above technical problems, which can improve the accuracy of license idle information synchronized to each cluster, thereby improving the utilization rate of license resources.
[0006] In a first aspect, an embodiment of the present application provides an information synchronization method, which is applied to a license server, wherein a port listener and a log parser are deployed in the license server, and the method includes:
[0007] Monitor the license transfer requests of the applications to be licensed sent by each cluster through the port listener;
[0008] In the case of detecting a license transfer request, calling a log parser to analyze and process the license information in the log file to determine the target license free information of the application to be licensed; the license information includes the information generated by each cluster applying for a license transfer operation for the application to be licensed;
[0009] The target license idle information is sent to each cluster to synchronize the target license idle information to each cluster.
[0010] The technical solution in the embodiment of the present application is applied to a license server, in which a port listener and a log parser are deployed. The license transfer request of the application to be licensed sent by each cluster is monitored through the port listener. When a license transfer request is detected, the log parser is called to analyze and process the license information in the log file to determine the target license idle information of the application to be licensed, and the target license idle information is sent to each cluster to synchronize the target license idle information to each cluster. The license information includes the information generated by each cluster applying for a license transfer operation for the licensed application. The above method can timely monitor the license transfer request of each cluster in the log file in real time through the port listener. The information generated by the license transfer operation is analyzed and processed to obtain the accurate license idle information of the dynamically changing application to be licensed, that is, the target license idle information, and the target license idle information is synchronized to each cluster, so that each cluster can obtain the license idle information of all license resources of the application to be licensed, ensuring the real-time nature of the license idle information obtained by each cluster, and on this basis, each cluster can share the license resources of the application to be licensed, reasonably apply for license authorization, improve the utilization rate of license resources, and provide reliable information support for task scheduling when multiple clusters process large-scale tasks; at the same time, the above method does not require manual participation of users, which can not only improve the speed of information synchronization, but also improve the accuracy of information synchronization.
[0011] In one embodiment, analyzing and processing the license information in the log file to determine the target license free information of the application to be licensed includes:
[0012] Calling the file parsing function corresponding to the log file, identifying and processing the license information in the log file, and obtaining the newly added license information corresponding to the application to be licensed;
[0013] According to the newly added license information and the corresponding historical license information corresponding to the application program to be licensed, target license free information is obtained.
[0014] The technical solution in the embodiment of the present application calls the file parsing function corresponding to the log file, identifies and processes the license information in the log file, obtains the newly added license information corresponding to the application to be licensed, and obtains the target license idle information based on the newly added license information corresponding to the application to be licensed and the corresponding historical license information; the above method can identify and process the license information in the log file, can obtain the dynamically changing newly added license information of the application to be licensed, and based on the newly added license information, can obtain the accurate total license idle information of the application to be licensed and the target license idle information.
[0015] In one embodiment, the method further comprises:
[0016] The license free information of the application program to be approved stored in the database before the current moment is obtained as the historical license information; the database is created according to the license information of the application program to be approved that is periodically obtained.
[0017] The technical solution in the embodiment of the present application can obtain the license idle information of the application to be licensed stored in a periodically updated database before the current moment as historical license information, which can improve the accuracy of the acquired historical license information and provide reliable reference information for the subsequent acquisition of accurate target license idle information.
[0018] In one embodiment, the method further comprises:
[0019] When the target license idle information is determined, the license idle information stored in the database is updated according to the target license idle information.
[0020] The technical solution in the embodiment of the present application, when the target license idle information is determined, updates the license idle information stored in the database according to the target license idle information to ensure that the license idle information stored in the database fits the actual scenario, improves the correctness of the license idle information stored in the database, and provides reliable reference information for subsequent precise processing.
[0021] In one embodiment, the license transfer request carries a license transfer identifier and application license information; and the response process of the license transfer request of the application to be licensed includes:
[0022] Determine a response message to the license transfer request based on historical license information and license application information of the application to be licensed;
[0023] When the response message is license authorization information, the license transfer operation is performed according to the license transfer identifier and the license application information;
[0024] The application license information is determined as new license information corresponding to the application program to be licensed, and the new license information is added to the log file.
[0025] The technical solution in the embodiment of the present application determines the response message of the license transfer request based on the historical license information and application license information of the application to be licensed, and when the response message is the license authorization information, performs the license transfer operation based on the license transfer identifier and the application license information, determines the application license information as the newly added license information corresponding to the application to be licensed, and adds the newly added license information to the log file; the above method can verify whether the license transfer operation can be successfully performed based on the historical license information of the application to be licensed before performing the license transfer operation, so as to avoid the subsequent execution of invalid license transfer operations, which can improve the efficiency of performing license transfer operations.
[0026] In one embodiment, the license transfer request also carries a cluster identifier; and according to the historical license information and the license application information of the application to be licensed, determining a response message of the license transfer request includes:
[0027] In the case where the historical license information satisfies the application license information, allocating a license corresponding to the application program to be licensed to the target cluster corresponding to the cluster identifier, and determining that the response message is license authorization information;
[0028] In the case where the historical license information does not satisfy the application license information, the response message is determined to be license rejection information.
[0029] The technical solution in the embodiment of the present application, when the historical license information meets the application license information, allocates the license corresponding to the application to be licensed to the target cluster corresponding to the cluster identifier, and determines the response message as license authorization information; when the historical license information does not meet the application license information, determines the response message as license rejection information; the above method does not require the participation of complex algorithms, and the processing process is relatively simple, thereby speeding up the determination of the response message of the license transfer request, improving the determination efficiency of the response message, and on this basis, can also provide reliable dependency information for further executing effective license transfer operations.
[0030] In one of the embodiments, the license transfer request also carries a cluster identifier; the method further includes:
[0031] Perform a validity check on the target cluster corresponding to the cluster identifier;
[0032] If the legality check passes, a step of performing a license transfer operation on the target cluster according to the license transfer identifier and the license attribute information is executed.
[0033] The technical solution in the embodiment of the present application performs a legitimacy check on the target cluster corresponding to the cluster identifier, and if the legitimacy check passes, executes the step of performing a license transfer operation on the target cluster based on the license transfer identifier and the license attribute information; the above method can perform a legitimacy check on the cluster that sends the license transfer request before executing the license transfer operation, so as to improve the security of license resources, and can also avoid the problem of allocating licenses to illegal clusters, thereby improving the security of applications to be licensed.
[0034] In a second aspect, an embodiment of the present application provides an information synchronization device, the device comprising:
[0035] A monitoring module, used for monitoring the license transfer requests of the application programs to be licensed sent by each cluster through a port listener deployed in the license server;
[0036] The analysis and processing module is used to call the log parser deployed in the license server when a license transfer request is detected, and analyze the license information in the log file to determine the target license free information of the application to be licensed; the license information includes the information generated by each cluster for the license transfer operation of the application to be licensed;
[0037] The sending module is used to send the target license idle information to each cluster to synchronize the target license idle information to each cluster.
[0038] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any one of the embodiments of the first aspect when executing the computer program.
[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment in the above-mentioned first aspect are implemented.
[0040] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any embodiment of the first aspect above.
[0041] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1An application environment diagram of an information synchronization method in an embodiment;
[0043] Figure 2 A schematic diagram of a flow chart of an information synchronization method in an embodiment;
[0044] Figure 3 A flowchart of an information synchronization method according to another embodiment;
[0045] Figure 4 A flowchart of an information synchronization method according to another embodiment;
[0046] Figure 5 A flowchart of an information synchronization method according to another embodiment;
[0047] Figure 6 is a structural block diagram of an information synchronization device in an embodiment;
[0048] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] In the field of large-scale task processing, in order to improve the efficiency of task processing, such tasks are often assigned to at least one cluster and processed in parallel by the task processing applications deployed in each cluster. In practical applications, when the task processing application is started, the application license server needs to perform license authorization to obtain license authorization. In the related art, when the license server performs license authorization, it usually allocates corresponding license resources to each cluster in advance according to the proportional allocation method, and then synchronizes the different license idle information pre-allocated to each cluster to each cluster respectively, so that each cluster obtains the corresponding license authorization according to the corresponding license idle information when using the task processing application to use the license resources allocated to it. However, the accuracy of the license idle information synchronized to each cluster in the related art is low, resulting in a reduced utilization rate of the license resources. Based on this, the embodiment of the present application provides an information synchronization method, which can improve the accuracy of the license idle information synchronized to each cluster, thereby improving the utilization rate of the license resources.
[0051] The information synchronization method provided in the embodiment of the present application can be applied to Figure 1 The application environment diagram shown. The application environment includes a license authorization system for the application to be licensed, and the license authorization system may include multiple clusters and license servers ( Figure 1 Taking n clusters as an example), each cluster can be connected to the license server by communication, and the communication method can be Wi-Fi, mobile network or Bluetooth connection, etc. It should be noted here that the information synchronization method in the embodiment of the present application is implemented based on a license authorization management solution, and the license authorization management solution can be FlexNet Producer Suite, FlexNet Manager Suite, etc., but in the embodiment of the present application, the license authorization management solution is FlexNet Publisher as an example for explanation. Optionally, each cluster can include multiple computing nodes and one management node, and each computing node and management node can be a personal computer, desktop computer, laptop computer, smart phone, smart bracelet and other electronic devices. The above-mentioned license server can be, but is not limited to, an independent server or a server cluster composed of multiple servers. This embodiment does not limit the specific form of each computing node, management node and license server. The specific process of the information synchronization method is introduced below using the license server as the execution subject of the information synchronization method.
[0052] like Figure 2 As shown, it is a flow chart of the information synchronization method provided in the embodiment of the present application. The method is applied to the license server, and the license server is deployed with a port listener and a log parser. The method can be implemented by the following steps:
[0053] S100: Monitor the license transfer requests of the application programs to be licensed sent by each cluster through a port listener.
[0054] The above-mentioned applications to be licensed may be game applications, chat applications, learning applications, sports applications, remote conference applications, etc.
[0055] In the embodiment of the present application, a port listener and a log parser are pre-deployed on the license server. In practical applications, the license server can start the port listener to monitor the license transfer request of the application to be licensed sent by the management node in each cluster of the license authorization system.
[0056] It should be noted that when any cluster needs to use the application to be licensed, it can apply for license authorization from the license server before normal use, and the application is authorized in a floating authorization manner. At the same time, at least one management node in a cluster can send a license transfer request for the application to be licensed to the license server. Optionally, the license transfer requests sent by management nodes in different clusters to the license server carry different information.
[0057] Optionally, the license transfer request may be a license check-out request or a license check-in request; wherein the license check-out request is used to apply to the license server for allocation of a corresponding license; and the license check-in request is used to return or release the authorized corresponding license to the license server.
[0058] Among them, at least one cluster in the license authorization system can execute the corresponding large-scale task after starting the application to be licensed. In the embodiment of the present application, each cluster can be a SLURM cluster.
[0059] S200: When a license transfer request is detected, a log parser is called to analyze the license information in the log file to determine target license free information of the application to be licensed, wherein the license information includes information generated by each cluster for the license transfer operation of the application to be licensed.
[0060] The monitoring of the existence of a license transfer request refers to monitoring the license transfer request sent by a management node in at least one cluster; at the same time, a management node in a cluster can send a license transfer request to a licensing server.
[0061] Specifically, after the license server responds to any license transfer request, the license information in the log file changes. In the embodiment of the present application, when the license server detects through the port listener the existence of a license transfer request sent by a management node in any cluster, it can promptly send a parsing request to the log parser to wake up the log parser and call the log parser to analyze and process the license information in the log file to determine the target license idle information of the application to be licensed.
[0062] Optionally, the license information may include license type, authorized function, key information, verification information, license quantity and other license-related information. Meanwhile, the target license free information may include information such as the type and quantity of remaining licenses available for application in the resource pool of the application to be licensed; the resource pool may include at least one license for the application to be licensed.
[0063] In one embodiment, the method for analyzing and processing the license information in the log file can be to pre-train an algorithm model, and then input the log file into the algorithm model, and the algorithm model analyzes and processes the license information in the log file and outputs the target license free information of the application to be licensed.
[0064] In another embodiment, the license information in the log file may be analyzed and processed by extracting and / or filtering the license information in the log file to obtain target license free information of the application to be licensed.
[0065] S300 . Send target license idle information to each cluster to synchronize the target license idle information to each cluster.
[0066] Furthermore, the license server may send the target license idle information of the application program to be licensed obtained by the log parser analysis to each cluster in the license authorization system, so as to synchronize the target license idle information to each cluster.
[0067] The technical solution in the embodiment of the present application is applied to a license server, in which a port listener and a log parser are deployed. The license transfer request of the application to be licensed sent by each cluster is monitored through the port listener. When a license transfer request is detected, the log parser is called to analyze and process the license information in the log file to determine the target license idle information of the application to be licensed, and the target license idle information is sent to each cluster to synchronize the target license idle information to each cluster. The license information includes the information generated by each cluster applying for a license transfer operation for the licensed application. The above method can timely monitor the license transfer request of each cluster in the log file in real time through the port listener. The information generated by the license transfer operation is analyzed and processed to obtain the accurate license idle information of the dynamically changing application to be licensed, that is, the target license idle information, and the target license idle information is synchronized to each cluster, so that each cluster can obtain the license idle information of all license resources of the application to be licensed, ensuring the real-time nature of the license idle information obtained by each cluster, and on this basis, each cluster can share the license resources of the application to be licensed, reasonably apply for license authorization, improve the utilization rate of license resources, and provide reliable information support for task scheduling when multiple clusters process large-scale tasks; at the same time, the above method does not require manual participation of users, which can not only improve the speed of information synchronization, but also improve the accuracy of information synchronization.
[0068] The following is a description of the process of analyzing the license information in the log file to determine the target license free information of the application to be licensed. Figure 3 As shown, the steps in S200 above can be implemented by the following steps:
[0069] S210: Calling a file parsing function corresponding to the log file, identifying and processing the license information in the log file, and obtaining new license information corresponding to the application to be licensed.
[0070] The license information in the log file can be recorded in different languages, and the language type of the license information recorded in the log file can be any language type. In an embodiment of the present application, the language type of the license information recorded in the log file corresponds to the type of the file parsing function; optionally, the file parsing function can be but is not limited to Innovus, Ansys, IC Compiler or ABAQUS.
[0071] Specifically, the license server can call the log parser and determine the corresponding file parsing function according to the language type of the license information recorded in the log file, and then call the file parsing function corresponding to the log file to identify and process the license information in the log file to obtain the newly added license information corresponding to the application to be licensed.
[0072] Among them, the way in which the file parsing function identifies and processes the licensing information in the log file can be that the file parsing function uses context analysis, content analysis or intelligent analysis to identify and process the licensing information in the log file to obtain the newly added licensing information corresponding to the application to be licensed in the log file.
[0073] In an embodiment of the present application, the file parsing function may identify and process the license information in the log file by scanning each line of information in the log file in turn to identify the keywords of the license check-out or license check-in in the log file, and then obtain the information of the line where the keyword is located, that is, the newly added information, as the newly added license information corresponding to the application to be licensed.
[0074] S220: Obtain target license free information according to the newly added license information and the corresponding historical license information corresponding to the application to be licensed.
[0075] Specifically, the license server may pre-train a processing model, and then input both the newly added license information and the corresponding historical license information corresponding to the application to be licensed into the processing model, and the processing model outputs the target license free information of the application to be licensed.
[0076] At the same time, the license server may obtain the historical license information corresponding to the application to be licensed, and perform arithmetic operations on the newly added license information corresponding to the application to be licensed and the corresponding historical license information to obtain the target license idle information of the application to be licensed. Optionally, the arithmetic operation may be an addition operation and / or a subtraction operation. The historical license information may include the total license resource information of the application to be licensed and the license idle information obtained before the current moment.
[0077] The total license resource information may include the total number of licenses that can be authorized by the application to be licensed, multiple licenses, the type of each license, and other information.
[0078] In one embodiment, before executing the step in S220, the method may further include: obtaining the license free information of the application to be approved stored in the database before the current moment as the historical license information. The database is created based on the license information of the application to be approved that is periodically obtained.
[0079] In actual applications, the license server can store the license file and the target license idle information obtained after each license transfer operation in its own memory, and then periodically call the lmstat tool to query the detailed information of the license in its own memory, extract key information from the detailed information, and store the key information in the database, and after each license transfer operation, the target license idle information can also be stored in the database. Optionally, the information in the above license file can include license type, authorized function, key information, verification information, total number of licenses, license idle information, etc.
[0080] Among them, periodic updating of the database can prevent the total number of licenses that can be applied for authorization from changing due to changes in the license file of the application to be licensed or the expiration of the license, and can ensure the accuracy of the license information in the database. Optionally, the periodic interval time can be 35 minutes, 40 minutes, 45 minutes, etc. In the embodiment of the present application, the periodic interval time is 30 minutes as an example for explanation.
[0081] In an embodiment of the present application, the periodic interval does not need to be too short, thereby avoiding the query burden on the license server caused by frequent calls to the lmstat tool, effectively reducing the service pressure of the license server, and helping to improve the speed and stability of the license server's response to license transfer requests.
[0082] Optionally, the key information may be the type of license server, the name of the license server, the IP address of the license server, and the name of the license feature, the total number of licenses for the application to be licensed, and historical license information (i.e., the license idle information obtained before the current moment). In the embodiment of the present application, the type of license server, the name of the license server, the IP address of the license server, and the name of the license feature, the identification type and field of the total number of licenses for the application to be licensed are shown in Table 1.
[0083] Table 1
[0084]
[0085] It should be noted that the license server can obtain the latest license information from the memory to store the latest license information in the database, so that the database always stores the most accurate real license idle information. The latest license information may include total license resource information and target license idle information obtained during each information synchronization process.
[0086] In the embodiment of the present application, the license server can read the license idle information of the application to be licensed stored in the database before the current moment as the historical license information. Further, the license server can perform arithmetic operations on the newly added license information and the corresponding historical license information corresponding to the application to be licensed according to the type of the license transfer request to obtain the target license idle information.
[0087] Among them, if the type of license transfer request is a license check-out request, the target license free information can be obtained by subtracting the new license information from the historical license information; if the type of license transfer request is a license check-in request, the target license free information can be obtained by summing the historical license information and the new license information.
[0088] This embodiment can obtain the license idle information of the application to be licensed stored in the periodically updated database before the current moment as historical license information, which can improve the accuracy of the acquired historical license information and provide reliable reference information for subsequent acquisition of accurate target license idle information.
[0089] The technical solution in the embodiment of the present application calls the file parsing function corresponding to the log file, identifies and processes the license information in the log file, obtains the newly added license information corresponding to the application to be licensed, and obtains the target license idle information based on the newly added license information corresponding to the application to be licensed and the corresponding historical license information; the above method can identify and process the license information in the log file, can obtain the dynamically changing newly added license information of the application to be licensed, and based on the newly added license information, can obtain the accurate total license idle information of the application to be licensed and the target license idle information.
[0090] In one embodiment, the method further includes: when the target license idle information is determined, updating the license idle information stored in the database according to the target license idle information.
[0091] It should be noted here that each time the target license idle information of the application to be permitted is re-acquired, the license idle information stored in the database may be updated in real time according to the target license idle information.
[0092] The technical solution in the embodiment of the present application, when the target license idle information is determined, updates the license idle information stored in the database according to the target license idle information to ensure that the license idle information stored in the database fits the actual scenario, improves the correctness of the license idle information stored in the database, and provides reliable reference information for subsequent precise processing.
[0093] The following is an explanation of the response process of the license transfer request of the above-mentioned application to be licensed. In one embodiment, the license transfer identification and application license information carried in the above-mentioned license transfer request; Figure 4 As shown, the response process of the license transfer request of the above-mentioned application to be licensed can be implemented by the following steps:
[0094] S400: Determine a response message to the license transfer request according to the historical license information and the license application information of the application to be licensed.
[0095] Specifically, the license server may perform analysis processing, matching processing and / or verification processing according to the historical license information of the application program to be licensed and the license application information, and determine a response message to the license transfer request.
[0096] In addition, the license server may pre-train a license information processing model, and then input the historical license information and the license application information of the application to be licensed into the license information processing model, and the license information processing model outputs a response message to the license transfer request.
[0097] Among them, the above-mentioned license information processing model can be implemented by at least one of a convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, a recurrent neural network model, a residual neural network model, etc. Optionally, the response message of the above-mentioned license transfer request can be license authorization information or license rejection information; wherein, the response message of the license transfer request is license authorization information, indicating that the license server can successfully respond to the license transfer request; the response message of the license transfer request is license rejection information, indicating that the license server cannot successfully respond to the license transfer request. It should be noted here that after the license server successfully responds to the license transfer request, the corresponding cluster that sent the license transfer request can use the application to be licensed normally.
[0098] S500: When the response message is license authorization information, perform a license transfer operation according to the license transfer identifier and the application permission information.
[0099] Specifically, when the response message is license authorization information, the license server can perform a license transfer operation according to the license transfer identifier and the license application information in accordance with the preset license transfer strategy. The license transfer identifier can be a license check-out identifier or a license check-in identifier.
[0100] In addition, the license server may also call a corresponding license transfer tool to perform a license transfer operation according to the license transfer identifier and the license application information.
[0101] In actual applications, the management node in any cluster can call its built-in license client component to query configuration information, which may include the host name and IP address of the license server, the port number that the manager lmgrd process deployed on the license server listens to, and other information. Further, the management node can send a license transfer request to the manager lmgrd process deployed on the license server according to the port number that the manager lmgrd process listens to in the configuration information, and instruct the manager lmgrd process to respond to the license transfer request.
[0102] Furthermore, the manager lmgrd process can obtain information such as the port number of the vendor daemon of the application to be licensed deployed on the license server in response to the license transfer request, and then send the information to the management node, instructing the management node to send the license transfer request to the vendor daemon deployed on the license server according to the port number of the vendor daemon. Correspondingly, the vendor daemon can start to execute the steps of performing the license transfer operation according to the license transfer identifier and the license application information.
[0103] S600: Determine the application permission information as the newly added permission information corresponding to the application program to be permitted, and add the newly added permission information to the log file.
[0104] Furthermore, when the license transfer operation is completed, the application license information can be determined as newly added license information corresponding to the application program to be licensed, and the newly added license information can be added to the log file for subsequent use.
[0105] The technical solution in the embodiment of the present application determines the response message of the license transfer request based on the historical license information and application license information of the application to be licensed, and when the response message is the license authorization information, performs the license transfer operation based on the license transfer identifier and the application license information, determines the application license information as the newly added license information corresponding to the application to be licensed, and adds the newly added license information to the log file; the above method can verify whether the license transfer operation can be successfully performed based on the historical license information of the application to be licensed before performing the license transfer operation, so as to avoid the subsequent execution of invalid license transfer operations, which can improve the efficiency of performing license transfer operations.
[0106] The following is an explanation of the process of determining the response message of the license transfer request based on the historical license information and the license application information of the application to be licensed. In one embodiment, the license transfer request also carries a cluster identifier; the steps in S400 may include:
[0107] When the historical license information meets the application license information, the license corresponding to the application to be licensed is allocated to the target cluster corresponding to the cluster identifier, and the response message is determined to be license authorization information; when the historical license information does not meet the application license information, the response message is determined to be license rejection information.
[0108] Specifically, the license server can determine whether the historical license information satisfies the application license information. If yes, the license corresponding to the application to be licensed is allocated to the target cluster corresponding to the cluster identifier, and the response message is determined to be license authorization information. Otherwise, the response message is determined to be license rejection information.
[0109] Optionally, the target cluster may be any cluster in the license authorization system. It should be noted that historical license information satisfies application license information, which means that the remaining available licenses in the resource pool satisfy both the license type and the license quantity in the application license information.
[0110] In addition, the license server can feed back the response message of the license transfer request to the cluster that sent the license transfer request, that is, the management node in the cluster. Wherein, if the response message of the license transfer request is license rejection information, the management node can automatically exit the process of applying for license authorization.
[0111] The technical solution in the embodiment of the present application, when the historical license information meets the application license information, allocates the license corresponding to the application to be licensed to the target cluster corresponding to the cluster identifier, and determines the response message as license authorization information; when the historical license information does not meet the application license information, determines the response message as license rejection information; the above method does not require the participation of complex algorithms, and the processing process is relatively simple, thereby speeding up the determination of the response message of the license transfer request, improving the determination efficiency of the response message, and on this basis, can also provide reliable dependency information for further executing effective license transfer operations.
[0112] In one embodiment, the license transfer request also carries a cluster identifier; before executing the steps in S500, Figure 5 As shown, the above method may further include the following steps:
[0113] S700: Perform a validity check on the target cluster corresponding to the cluster identifier.
[0114] Specifically, the licensing server may perform a validity check on the target cluster corresponding to the cluster identifier.
[0115] In one embodiment, the method of performing the legality check on the target cluster corresponding to the cluster identifier may be to obtain a whitelist, and then search for the cluster identifier carried in the license transfer request among different cluster identifiers in the whitelist, and if the cluster identifier carried in the license transfer request is found in the whitelist, it is determined that the legality check of the target cluster has passed, otherwise, it is determined that the legality check of the target cluster has failed. Among them, each cluster identifier in the whitelist includes the cluster identifier corresponding to the legal cluster.
[0116] In yet another embodiment, the method of performing the legality check on the target cluster corresponding to the cluster identifier may be to perform the legality check on the target cluster corresponding to the cluster identifier according to a preset legality check method.
[0117] S800: When the legality check passes, execute the step of performing a license transfer operation on the target cluster according to the license transfer identifier and the license attribute information.
[0118] In the embodiment of the present application, when the legality check passes, a step of performing a license transfer operation on the target cluster according to the license transfer identifier and the license attribute information may be performed.
[0119] The technical solution in the embodiment of the present application performs a legitimacy check on the target cluster corresponding to the cluster identifier, and if the legitimacy check passes, executes the step of performing a license transfer operation on the target cluster based on the license transfer identifier and the license attribute information; the above method can perform a legitimacy check on the cluster that sends the license transfer request before executing the license transfer operation, so as to improve the security of license resources, and can also avoid the problem of allocating licenses to illegal clusters, thereby improving the security of applications to be licensed.
[0120] In one embodiment, the present application also provides an information synchronization method, which is applied to a license server, in which a port listener and a log parser are deployed. The method includes the following process:
[0121] (1) Monitor the license transfer requests of the applications to be licensed sent by each cluster through a port listener; the license transfer identifier, license application information and cluster identifier carried in the license transfer request;
[0122] (2) when a license transfer request is detected, and when the historical license information satisfies the license application information, the license corresponding to the application to be licensed is allocated to the target cluster corresponding to the cluster identifier, and the response message is determined to be license authorization information;
[0123] (3) when the historical license information does not satisfy the application license information, determining that the response message is license rejection information;
[0124] (4) If the response message is license authorization information, perform a legitimacy check on the target cluster corresponding to the cluster identifier;
[0125] (5) If the legality check is passed, the license transfer operation is carried out according to the license transfer identification and application license information;
[0126] (6) Determine the application license information as the newly added license information corresponding to the application to be licensed, and add the newly added license information to the log file;
[0127] (7) Calling the log parser, calling the file parsing function corresponding to the log file, identifying and processing the license information in the log file, and obtaining the newly added license information corresponding to the application to be licensed;
[0128] (8) obtaining the license free information of the application to be approved stored in the database before the current time as the historical license information; the database is created based on the license information of the application to be approved that is periodically obtained;
[0129] (9) Obtaining target license free information based on the newly added license information and the corresponding historical license information corresponding to the application to be licensed; the license information includes the information generated by each cluster for the license transfer operation of the application to be licensed;
[0130] (10) Sending target license idle information to each cluster to synchronize the target license idle information to each cluster;
[0131] (11) When the target license idle information is determined, the license idle information stored in the database is updated according to the target license idle information.
[0132] The execution process of the above (1) to (11) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0133] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0134] Based on the same inventive concept, the embodiment of the present application also provides an information synchronization device for implementing the information synchronization method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more information synchronization device embodiments provided below can refer to the limitations on the information synchronization method above, and will not be repeated here.
[0135] In one embodiment, Figure 6 This is a schematic diagram of the structure of an information synchronization device in an embodiment of the present application. The information synchronization device provided in the embodiment of the present application can be applied to a license server, in which a port listener and a log parser are deployed. Figure 6 As shown, the information synchronization device of the embodiment of the present application may include: a monitoring module 11, an analysis and processing module 12 and a sending module 13, wherein:
[0136] A monitoring module 11 is used to monitor the license transfer requests of the application programs to be licensed sent by each cluster through a port listener deployed in the license server;
[0137] The analysis and processing module 12 is used to call the log parser deployed in the license server to analyze and process the license information in the log file to determine the target license free information of the application to be licensed; the license information includes the information generated by each cluster for the license transfer operation of the application to be licensed;
[0138] The sending module 13 is used to send the target license idle information to each cluster to synchronize the target license idle information to each cluster.
[0139] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0140] In one embodiment, the analysis processing module 12 includes: an identification processing unit and a first acquisition unit, wherein:
[0141] An identification processing unit, used to call a file parsing function corresponding to the log file, identify and process the license information in the log file, and obtain new license information corresponding to the application to be licensed;
[0142] The first acquisition unit is used to obtain target license free information according to the newly added license information and the corresponding historical license information corresponding to the application program to be licensed.
[0143] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0144] In one embodiment, the analysis and processing module 12 further includes: a second acquisition unit, wherein:
[0145] The second acquisition unit is used to acquire the license free information of the application program to be approved stored in the database before the current moment as the historical license information; the database is created according to the license information of the application program to be approved acquired periodically.
[0146] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0147] In one embodiment, the information synchronization device further includes: an information updating module, wherein:
[0148] The information updating module is used to update the license idle information stored in the database according to the target license idle information when the target license idle information is determined.
[0149] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0150] In one embodiment, the license transfer request carries the license transfer identifier and the application permission information; the information synchronization device further includes: a determination module, a transfer operation module and an addition module, wherein:
[0151] A determination module, used to determine a response message of a license transfer request according to historical license information and license application information of the application to be licensed;
[0152] A transfer operation module, used for performing a license transfer operation according to the license transfer identifier and the license application information when the response message is the license authorization information;
[0153] The adding module is used to determine the application license information as the newly added license information corresponding to the application program to be licensed, and add the newly added license information to the log file.
[0154] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0155] In one embodiment, the license transfer request also carries a cluster identifier; the determination module includes: a first determination unit and a second determination unit, wherein:
[0156] A first determining unit is used to allocate a license corresponding to the application program to be licensed to the target cluster corresponding to the cluster identifier when the historical license information satisfies the application license information, and determine that the response message is license authorization information;
[0157] The second determining unit is configured to determine that the response message is license rejection information if the historical license information does not satisfy the application license information.
[0158] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0159] In one embodiment, the license transfer request also carries a cluster identifier; the determination module further includes: a legality verification unit and a determination execution unit, wherein:
[0160] A legality verification unit, used to verify the legality of a target cluster corresponding to the cluster identifier;
[0161] An execution unit is determined, which is used to execute the step of performing a license transfer operation on the target cluster according to the license transfer identifier and the license attribute information when the legality check passes.
[0162] The information synchronization device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned information synchronization method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0163] For the specific definition of the information synchronization device, please refer to the definition of the information synchronization method above, which will not be repeated here. Each module in the above-mentioned information synchronization device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0164] In one embodiment, a computer device is also provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide processing capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a database. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an information synchronization method is implemented.
[0165] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0166] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned information synchronization method embodiment of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0167] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the above-mentioned information synchronization method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0168] In one embodiment, a computer program product is also provided, including a computer program, which, when executed by a processor, implements the technical solution of the above-mentioned information synchronization method of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0169] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0170] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0171] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An information synchronization method, characterized in that: Applied to a license server, wherein a port listener and a log parser are deployed in the license server, the method comprises: Monitoring the license transfer requests of the application programs to be licensed sent by each cluster through the port listener; In the case of detecting a license transfer request, calling the log parser to analyze and process the license information in the log file to determine the target license free information of the application to be licensed; the license information includes the information generated by each cluster for applying for a license transfer operation for the application to be licensed; The target license idle information is sent to each of the clusters to synchronize the target license idle information to each of the clusters.
2. The method according to claim 1, characterized in that The step of analyzing and processing the license information in the log file to determine the target license free information of the application to be licensed includes: Calling a file parsing function corresponding to the log file, identifying and processing the license information in the log file, and obtaining new license information corresponding to the application to be licensed; The target license free information is obtained according to the newly added license information and the corresponding historical license information corresponding to the application to be licensed.
3. The method according to claim 2, characterized in that The method further comprises: The license free information of the application to be permitted stored in the database before the current moment is obtained as the historical permission information; the database is created according to the periodically obtained permission information of the application to be permitted.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the target license idle information is determined, the license idle information stored in the database is updated according to the target license idle information.
5. The method according to any one of claims 1 to 3, characterized in that: The license transfer identifier and the license application information carried in the license transfer request; the response process of the license transfer request of the application to be licensed includes: Determining a response message to the license transfer request according to the historical license information of the application to be licensed and the license application information; In the case where the response message is license authorization information, performing a license transfer operation according to the license transfer identifier and the application permission information; The application permission information is determined as newly added permission information corresponding to the application program to be permitted, and the newly added permission information is added to the log file.
6. The method according to claim 5, characterized in that The license transfer request also carries a cluster identifier; the step of determining a response message to the license transfer request based on the historical license information of the application to be licensed and the license application information includes: In the case where the historical license information satisfies the application license information, allocating the license corresponding to the application to be licensed to the target cluster corresponding to the cluster identifier, and determining that the response message is license authorization information; In a case where the historical permission information does not satisfy the application permission information, the response message is determined to be license rejection information.
7. The method according to claim 5, characterized in that The license transfer request also carries a cluster identifier; the method further includes: Performing a validity check on the target cluster corresponding to the cluster identifier; If the legality check passes, the step of performing a license transfer operation on the target cluster according to the license transfer identifier and the license attribute information is performed.
8. An information synchronization device, characterized in that: The device comprises: A monitoring module, used for monitoring the license transfer requests of the application programs to be licensed sent by each cluster through a port listener deployed in the license server; An analysis and processing module is used to call the log parser deployed in the license server to analyze and process the license information in the log file to determine the target license free information of the application to be licensed when a license transfer request is detected; the license information includes information generated by each cluster for the license transfer operation applied for by the application to be licensed; The sending module is used to send the target license idle information to each of the clusters to synchronize the target license idle information to each of the clusters.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.