Baseline solution log control method, device, equipment, medium and program product

By assigning a unique identifier to each baseline and dynamically adjusting the log level, the problem of server performance degradation caused by globally setting low-level logs in NRTK baseline solving is solved, achieving efficient log control and server load optimization.

CN121523754BActive Publication Date: 2026-11-06BEIJING LIUFEN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511440651.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2026-11-06
Estimated Expiration
2045-10-09

AI Technical Summary

Technical Problem

During NRTK baseline computation, existing technologies require setting a low-level log globally to obtain detailed logs, which leads to decreased server performance and reduced computation efficiency.

Method used

Assign a unique identifier to each baseline, dynamically adjust its log level based on the baseline identifier, print only the solution logs for specific baselines, and encapsulate the log printing logic using macro definitions to reduce invalid log output.

Benefits of technology

It improves baseline calculation efficiency, reduces server load, simplifies log management, and supports flexible control and real-time adjustment of baseline calculation logs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121523754B_ABST
    Figure CN121523754B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a baseline solution log control method, device, equipment, medium and program product. The method comprises: obtaining configuration update information, setting the log level variable of the baseline solution instance corresponding to the target baseline identifier to the current log level, and when the baseline solution instance generates a log, determining whether to print the log according to the comparison result of the log level variable and the preset parameter. By maintaining the log level variable of each baseline through the baseline identifier, the log level of a specific baseline solution instance can be modified based on the variable and printed separately, without printing all baseline solution logs on the server, reducing invalid log output, reducing server load, and improving baseline solution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of baseline resolution technology, and in particular to a baseline resolution log control method, apparatus, device, medium and program product. Background Technology

[0002] NRTK (Network Real-Time Kinematic) is an important GNSS (Global Navigation Satellite System) positioning technology that can be applied to mapping, engineering surveying, and UAV navigation. The core of NRTK lies in baseline calculation; by calculating the baselines formed between base stations, high-precision position information can be obtained.

[0003] When it is necessary to analyze the solution effect of a certain baseline, low-level logs need to be obtained for analysis. To do this, the log level of the server running the baseline solution must be modified so that the server prints low-level logs of all baselines. This will affect server performance and reduce solution efficiency. Summary of the Invention

[0004] This application provides a baseline solution log control method, apparatus, device, medium, and program product to solve the problem that baseline solution analysis reduces solution efficiency.

[0005] In a first aspect, embodiments of this application provide a baseline computation log control method, which can be applied to a server running multiple baseline computation instances and maintaining a separate log level variable for each baseline computation instance. The method includes:

[0006] Retrieve configuration update information, including the target baseline identifier and the current log level;

[0007] Set the log level variable corresponding to the identified baseline solution instance among multiple baseline solution instances to the current log level;

[0008] When a baseline solution instance generates logs, the log level variable of the baseline solution instance is compared with the preset parameters, and the decision on whether to print the log is based on the comparison result.

[0009] In one possible implementation, the preset parameters include multiple printing constants, each corresponding to a log level. The magnitude of the printing constant is proportional to the log level. The log level variable of the baseline solution instance is compared with the preset parameters, and a decision on whether to print a log is made based on the comparison result, including:

[0010] For any baseline solution instance, the printing constant is compared with the log level variable of the baseline solution instance in ascending order. When the printing constant is greater than or equal to the log level variable, the log is printed according to the log level corresponding to the printing constant.

[0011] In one possible implementation, it also includes:

[0012] The log printing logic is encapsulated into a function through macro definitions, and the macro-defined function is enabled when running the baseline solution instance;

[0013] The log printing logic includes: comparing the log level variable of the baseline solution instance with the preset parameters, and determining whether to print logs based on the comparison result.

[0014] In one possible implementation, obtaining configuration update information includes:

[0015] Listen to the preset configuration database, which is used to record the baseline identifier and the current log level;

[0016] If a new current log level is written to the configuration database, the new current log level and the identifier of the corresponding baseline are obtained as configuration update information.

[0017] In one possible implementation, the configuration database communicates with a web server, which provides a configuration management page to web clients. The web server updates the configuration database based on the data obtained by the web clients through the configuration management page.

[0018] In one possible implementation, the web server is also used for:

[0019] Receive the base station number and current log level sent by the web client. The base station number is associated with the identifiers of multiple baselines.

[0020] The identifier of each baseline associated with the base station number and the current log level are treated as a set of data and written or updated in batches to the configuration database.

[0021] In one possible implementation, the configuration update information also includes a validity period, and after setting the log level variable corresponding to the identified baseline solution instance among multiple baseline solution instances to the current log level, it also includes:

[0022] When the validity period expires, the log level variable will be changed back to its original value from the current log level.

[0023] Secondly, embodiments of this application provide a baseline computation log control device, which can be applied to a server running multiple baseline computation instances and maintaining a separate log level variable for each baseline computation instance. The device includes:

[0024] The acquisition module is used to acquire configuration update information, which includes the identifier of the target baseline and the current log level.

[0025] The variable setting module is used to set the log level variable corresponding to the identified baseline solution instance in multiple baseline solution instances to the current log level;

[0026] The printing module is used to compare the log level variable of the baseline solution instance with preset parameters when the baseline solution instance generates logs, and determine whether to print the logs based on the comparison results.

[0027] In one possible implementation, the printing module is further configured to: for any baseline solution instance, compare the printing constant with the log level variable of the baseline solution instance in ascending order, and when the printing constant is greater than or equal to the log level variable, print the log according to the log level corresponding to the printing constant.

[0028] In one possible implementation, the variable setting module is further configured to: encapsulate the log printing logic into a function through a macro definition, and enable the macro-defined function when running the baseline solution instance; wherein the log printing logic includes: comparing the log level variable of the baseline solution instance with a preset parameter, and determining whether to print the log based on the comparison result.

[0029] In one possible implementation, the acquisition module is further configured to: monitor a preset configuration database, which records the identifier of the baseline and the current log level; if a new current log level is written to the configuration database, the new current log level and the identifier of the corresponding baseline are acquired as configuration update information.

[0030] In one possible implementation, the configuration update information also includes an expiration period, and the variable setting module is further used to: change the log level variable back to its original value from the current log level after the expiration period expires.

[0031] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0032] The memory stores the instructions that the computer executes;

[0033] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0035] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0036] The baseline resolution log control method, apparatus, device, medium, and program products provided in this application, by obtaining configuration update information, can set the log level variable of the baseline resolution instance corresponding to the target baseline identifier to the current log level. When the baseline resolution instance generates logs, it can determine whether to print the logs based on the comparison result between the log level variable and preset parameters. By maintaining the log level variable of each baseline through the baseline identifier, the log level of a specific baseline resolution instance can be modified based on this variable and printed individually, eliminating the need to print all baseline resolution logs on the server, reducing invalid log output, lowering server load, and improving baseline resolution efficiency. Attached Figure Description

[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0038] Figure 1 A schematic diagram of an NRTK system architecture provided as an example in this application;

[0039] Figure 2 A baseline networking diagram is provided as an example in this application;

[0040] Figure 3 A flowchart illustrating a baseline solution log control method provided in an embodiment of this application;

[0041] Figure 4 A schematic diagram of a baseline solution log calling process provided in this application embodiment;

[0042] Figure 5 A schematic diagram of the structure of a baseline calculation log control device provided in an embodiment of this application;

[0043] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application.

[0044] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0046] In an NRTK system, multiple CORS stations (Continuously Operating Reference Stations, also known as base stations) form a network. The relative positions between stations are calculated through baseline solution to provide high-precision real-time positioning services. Since there are numerous CORS stations and the baselines formed between them, a distributed computing architecture is typically used, with multiple servers solving different baselines in parallel.

[0047] Figure 1 This is a schematic diagram of an NRTK system architecture provided as an example in this application. Figure 1 As shown, the baseline calculation involves a network (NET) module, a preprocessing (PRE) module, an ephemeris service (EPH) module, and an atmospheric modeling (RIE) module. The network module is responsible for networking CORS stations to obtain the baseline; the preprocessing module is responsible for processing the observations; the ephemeris service module is responsible for providing navigation ephemeris; and the atmospheric modeling module is responsible for subsequent processing based on the baseline calculation results. The baseline calculation (BL) module can include multiple servers. After obtaining baseline data from upstream, it is distributed to the servers for calculation. The calculation of each baseline can be completed by a baseline calculation instance running on the server.

[0048] Figure 2 This is an exemplary baseline network diagram provided for this application. Figure 2 As shown, each end of the baseline corresponds to a CORS station. When the number of CORS stations is large, the number of baselines will also increase. The solution of these baselines will be handled by the server.

[0049] The smallest unit of the baseline solution module is a baseline. Since solving a baseline is a stateful process, meaning that the baseline solution for the current epoch needs to use some intermediate data from the epochs that have already been solved, it is necessary to check the logs of the baseline running continuously for a period of time when analyzing the effect of the baseline solution.

[0050] The server logs during baseline solving have multiple levels, with lower levels containing more detailed information. Analyzing the effectiveness of baseline solving typically requires lower-level logs. For example, when optimizing algorithms or analyzing problems in baseline solving, debug-level logs may be needed.

[0051] To obtain the required log content, the log level must be globally set (e.g., set to debug level) when the server runs baseline calculation. However, the number of baselines that the server needs to calculate is large, which greatly increases the amount of logs on the server, impacts server performance, and increases the pressure on the log collection system. Moreover, in most cases, the analysis only targets a portion of the baselines calculated on a single server, and the excess logs also increase the workload of log analysis. Therefore, there is an urgent need for a solution that can obtain the calculation logs of a specified baseline.

[0052] Based on this, this application proposes a technical concept that assigns a unique identifier to each baseline, decouples the log level of the baseline solution from the server, binds the log level to a single baseline according to the identifier of the baseline, and can dynamically modify the log level of a specific baseline according to the identifier, so that the server prints the solution log of that specific baseline level.

[0053] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0054] Figure 3 This is a flowchart illustrating a baseline computation log control method provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes:

[0055] Step S301: Obtain configuration update information.

[0056] The configuration update information includes the target baseline identifier and the current log level.

[0057] The baseline calculation log control method of this application embodiment can be applied to a server, which can run multiple baseline calculation instances. Each baseline calculation instance can calculate one baseline, and each baseline can have a unique identifier.

[0058] In this embodiment, the server can maintain a separate log level variable for each baseline solving instance. The initial value of this log level variable can be empty or a default value. For example, the server can maintain a baseline information registry, which can contain information about all baselines solved on the server. This information can represent the mapping relationship between the baseline identifier, the baseline solving instance, and the log level variable.

[0059] For example, the server can access a pre-defined configuration database to retrieve the identifier of the baseline whose log level needs to be modified and the modified current log level. If multiple servers in the NRTK system are responsible for baseline calculation, the database can record the baseline information on these servers that requires log level modification, and each server can access the database to retrieve the data.

[0060] In some other possible implementations, configuration update information can also be obtained by loading a configuration file. For example, if a user needs to obtain the debug level logs when solving a certain target baseline, the identifier and debug level of that target baseline can be written as configuration update information into the configuration file, which the server can then load.

[0061] Step S302: Set the log level variable of the identified baseline solution instance among the multiple baseline solution instances to the current log level.

[0062] For example, after obtaining the identifier of the target baseline and the current log level, the server can locate the baseline computed instance corresponding to the target baseline in the maintained baseline information registry based on the identifier, and then distribute the current log level to that baseline computed instance, modifying the value of the log level variable of that baseline computed instance to the current log level. For instance, if there is a baseline with the identifier 12345 in the baseline information registry maintained by the server, and its baseline computed instance's log level variable is empty by default, but in the configuration update information, the identifier of the target baseline is 12345 and the current log level is debug, then the baseline computed instance corresponding to 12345 can be found through the baseline information registry, and its log level variable value is set to debug.

[0063] Step S303: When the baseline solution instance generates logs, compare the log level variable of the baseline solution instance with the preset parameters, and determine whether to print the logs based on the comparison result.

[0064] Baseline solution instances can generate logs during runtime. Statements responsible for logging can be set within the baseline solution instance's code. When these statements are executed, the value of a log level variable is compared to preset parameters. Based on the comparison result and preset printing rules, it is determined whether to print a log. The preset parameters can include specific log levels. For example, the preset parameter could be "debug." If the log level variable for the target baseline's baseline solution instance also has the value "debug," and they match, then the "debug" level log for that baseline solution instance can be printed for analysis of the solution's performance.

[0065] In the above embodiments, by obtaining configuration update information, the log level variable of the baseline solving instance corresponding to the target baseline identifier can be set to the current log level. When the baseline solving instance generates logs, it can be determined whether to print the logs based on the comparison result between the log level variable and the preset parameters. By maintaining the log level variable of each baseline through the baseline identifier, the log level of a specific baseline solving instance can be modified based on this variable and printed individually. This eliminates the need to print all baseline solving logs on the server, reduces invalid log output, lowers server load, and improves baseline solving efficiency.

[0066] Furthermore, in traditional methods, printing baseline resolution logs at specific levels is achieved by modifying the server's log level. If the baseline is reassigned to another server, the modified log level becomes ineffective for the reassigned baseline, requiring the reassigned server to be reconfigured, which is cumbersome. In the above embodiment, multiple servers responsible for baseline resolution in the NRTK system can obtain and set the baseline's log level in real time from the configuration update information. After the baseline is reassigned to a new server, there is no need for manual reconfiguration, and baseline resolution log printing remains unaffected.

[0067] In one embodiment, the baseline solution log control method may further include:

[0068] The log printing logic is encapsulated into a function through macro definitions, and the macro-defined function is enabled when running the baseline solution instance.

[0069] The log printing logic includes: comparing the log level variable of the baseline solution instance with the preset parameters, and determining whether to print logs based on the comparison result.

[0070] In this embodiment of the application, the server, as the running environment of the baseline solution instance, can be predefined through macros, and the defined content can be related to the printing logic of the baseline solution log.

[0071] For example, a log printing function and a log comparison function can be generated through macro definitions. The log printing function can be used to print logs according to the log level. The log comparison function can be used to compare the log level variable of the baseline solution instance with preset parameters and determine whether to call the log printing function based on the comparison result.

[0072] For example, log levels can be divided into trace, debug, info, warn, error, and critical in ascending order, with lower levels containing more detailed log content.

[0073] In the above embodiments, by defining the relevant functions for logging using macros, the baseline solution instance can call the macro definition content to print logs. Only the log printing code needs to be replaced with the macro definition content, and the solution code does not need to be significantly modified, resulting in low runtime overhead.

[0074] In one embodiment, the preset parameters include multiple printing constants, each corresponding to a log level. The magnitude of the printing constant is proportional to the log level. The log level variable of the baseline solution instance is compared with the preset parameters, and the decision to print a log is determined based on the comparison result, including:

[0075] For any baseline solution instance, the printing constant is compared with the log level variable of the baseline solution instance in ascending order. When the printing constant is greater than or equal to the log level variable, the log is printed according to the log level corresponding to the printing constant.

[0076] In this embodiment of the application, multiple printing constants can be predefined by macros, each constant corresponding to a log level, and the control of the log level is converted into a comparison of numerical values.

[0077] For example, the six log levels—trace, debug, info, warn, error, and critical—can be defined by macros as six printing constants: 0, 1, 2, 3, 4, and 5, respectively. The baseline solution instance can automatically convert the log levels into the corresponding values ​​during compilation and runtime.

[0078] For example, if the current log level of the target baseline is debug in the configuration update information, the baseline resolution instance of the target baseline will automatically convert debug to 1 after obtaining this level. Then, the log comparison function in the macro definition will compare 0, 1, 2, 3, 4, 5 (print constants) with 1 (current log level) in sequence. 0 does not satisfy the condition of being greater than or equal to 1, so it continues to compare 1. 1 satisfies the condition of being greater than or equal to 1, so the log of the baseline resolution instance can be printed according to the log level (debug) corresponding to 1.

[0079] The logging can be achieved by calling the logging function defined by macros.

[0080] In some possible implementations, the logging function's logging permissions can be initialized to the lowest logging level (i.e., trace level). This way, when the baseline solution instance runs, regardless of the current logging level, the logging function will have the permission to log at the corresponding level.

[0081] Figure 4 A schematic diagram of a baseline solution log calling process provided in this application embodiment is shown below. Figure 4 As shown, after the baseline solution instance runs, it can check whether the printing permission has been successfully initialized to the trace level. If not, it waits for the initialization to succeed. If yes, it prints logs until the baseline solution instance finishes running, and then initializes the permission after the instance ends.

[0082] In some possible implementations, a separate log printing function can be defined for each log level. For example, the LOG_DEBUG(...) function can be dedicated to printing logs at the debug level, the LOG_INFO(...) function can be dedicated to printing logs at the info level, and so on.

[0083] In the above embodiments, by defining the printing constants corresponding to the log levels, the log control logic can be transformed into numerical comparisons, further simplifying the log control of the baseline solution instance and reducing service overhead.

[0084] In one embodiment, obtaining configuration update information includes:

[0085] Monitor the preset configuration database; if a new current log level is written to the configuration database, obtain the new current log level and the corresponding baseline identifier as configuration update information.

[0086] The configuration database is used to record the baseline identifier and the current log level.

[0087] In this embodiment of the application, the server may run a listening service to monitor data changes in the configuration database, including new data writing and existing data updates.

[0088] For example, the configuration database originally recorded a data "10001-info", which was updated to "10001-debug" based on a database command. This indicates that the current log level of the baseline identified as "10001" has changed from info to debug. After the server detects this change, it reads "10001-debug" from the database as the configuration update information.

[0089] For example, a new data entry "10002-trace" is written to the configuration database. After the server detects this change, it reads "10002-trace" from the database as configuration update information.

[0090] In the above embodiments, by setting up a configuration database to store the mapping relationship between the baseline and the log level, multiple servers can listen to the database to achieve synchronous updates and long-term maintenance of the baseline and log level.

[0091] In one embodiment, the configuration database communicates with a web server, which provides a configuration management page to web clients. The web server updates the configuration database based on the data obtained by the web clients through the configuration management page.

[0092] In this embodiment of the application, baseline data in the configuration database can be set via a web page.

[0093] For example, the web client can run on the terminal device used by the user, the web server can provide page resources to the web client, the web client provides a human-computer interaction interface to the user based on the page resources, the user can input the identifier of the baseline and the log level to be analyzed into the interface, the web client transmits the data input by the user to the web server, the web server can generate database update instructions based on these data and send them to the configuration database, and the configuration database executes the instructions.

[0094] In one embodiment, the web server can also be used for:

[0095] Receive the base station number and current log level sent by the web client; batch write or update the configuration database with the identifier of each baseline associated with the base station number and the current log level as a set of data.

[0096] The base station number is associated with the identifiers of multiple baselines.

[0097] In this embodiment, the web page also supports batch setting of baseline log levels. Each base station can correspond to multiple baselines, and an association relationship can be established between base stations and baselines. By entering the base station number and log level in the configuration management page, all baselines associated with that base station can be set to that log level at once.

[0098] For example, the baseline identifier between base station A1 and base station B2 is 10002, the baseline identifier between base station A1 and base station C3 is 10003, and the baseline identifier between base station A1 and base station D4 is 10004. The user can enter A1 and debug in the configuration management page, and the web server can automatically generate three database update commands and send them to the configuration database. After the configuration database executes these commands, it writes new data "10002-debug", "10003-debug", and "10004-debug".

[0099] In the above embodiments, the log level of the baseline in the configuration database can be remotely adjusted in real time through a web page. The server can modify the log level of the baseline solution instance in real time through database changes, which helps to study the baseline solution effect online and improve efficiency.

[0100] In one embodiment, the configuration update information further includes a validity period, and after setting the log level variable corresponding to the identified baseline solution instance among multiple baseline solution instances to the current log level, it also includes:

[0101] When the validity period expires, the log level variable will be changed back to its original value from the current log level.

[0102] In one example, the validity period is 5 minutes, and the current log level is debug. After setting the log level variable of the baseline solution instance to debug, the baseline solution instance can continuously print logs at the debug level for 5 minutes. After 5 minutes, the debug level will be changed back to the original value.

[0103] Using the above method, the printing duration of low-level logs can be set as needed without manual intervention. After the debugging is completed on time, the original state will be automatically restored, avoiding the long-term operation of low-level logs due to forgetting or other factors, and saving log storage costs.

[0104] Figure 5 A schematic diagram of a baseline calculation log control device provided in this application is shown below. Figure 5 As shown, the baseline calculation log control device 500 provided in this embodiment includes:

[0105] The acquisition module 501 is used to acquire configuration update information, which includes the identifier of the target baseline and the current log level.

[0106] The variable setting module 502 is used to set the log level variable corresponding to the identified baseline solution instance in multiple baseline solution instances to the current log level;

[0107] The printing module 503 is used to compare the log level variable of the baseline solution instance with preset parameters when the baseline solution instance generates logs, and determine whether to print logs based on the comparison result.

[0108] In one possible implementation, the printing module 503 is further configured to: for any baseline solution instance, compare the printing constant with the log level variable of the baseline solution instance in ascending order, and when the printing constant is greater than or equal to the log level variable, print the log according to the log level corresponding to the printing constant.

[0109] In one possible implementation, the variable setting module 502 is further configured to: encapsulate the log printing logic into a function through a macro definition, and enable the macro-defined function when running the baseline solution instance; wherein the log printing logic includes: comparing the log level variable of the baseline solution instance with a preset parameter, and determining whether to print the log based on the comparison result.

[0110] In one possible implementation, the acquisition module 501 is further configured to: monitor a preset configuration database, which records the identifier of the baseline and the current log level; if a new current log level is written to the configuration database, the new current log level and the identifier of the corresponding baseline are acquired as configuration update information.

[0111] In one possible implementation, the configuration update information also includes an expiration period, and the variable setting module 502 is further configured to: change the log level variable back to its original value from the current log level after the expiration period expires.

[0112] The baseline calculation log control device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0113] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.

[0114] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.

[0115] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0116] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0117] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0118] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0119] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0120] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0121] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0122] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0123] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

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

[0125] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0126] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0128] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A baseline solution log control method, characterized by, Applied to a server running multiple baseline solving instances, each baseline solving instance solving for one baseline, and maintaining a separate log-level variable for each baseline solving instance, the method includes: Assign a unique identifier to each baseline to decouple the log level of the baseline from the server; bind the log level to a single baseline according to the baseline's identifier; Obtain configuration update information, which includes the identifier of the target baseline and the current log level; Set the log level variable of the baseline solution instance corresponding to the identifier in the plurality of baseline solution instances to the current log level; When the baseline solution instance generates logs, the log level variable of the baseline solution instance is compared with a preset parameter, and it is determined whether to print the logs based on the comparison result. A log printing function and a log comparison function are generated through macro definitions. The log printing function is used to print logs according to the log level, and the log comparison function is used to compare the log level variable of the baseline solution instance with preset parameters and determine whether to call the log printing function based on the comparison result. The macro-defined function is enabled when the baseline solution instance is run. The log printing logic includes: comparing the log level variable of the baseline solution instance with preset parameters, and determining whether to print logs based on the comparison result.

2. The method according to claim 1, characterized in that, The preset parameters include multiple printing constants, each corresponding to a log level. The magnitude of the printing constant is proportional to the log level. The step of comparing the log level variable of the baseline solution instance with the preset parameters and determining whether to print a log based on the comparison result includes: For any baseline solution instance, the printing constant is compared with the log level variable of the baseline solution instance in ascending order. When the printing constant is greater than or equal to the log level variable, the log is printed according to the log level corresponding to the printing constant.

3. The method according to claim 1 or 2, characterized in that, The process of obtaining configuration update information includes: Monitor a preset configuration database, which is used to record the baseline identifier and the current log level; If a new current log level is written to the configuration database, the new current log level and the identifier of the corresponding baseline are obtained as configuration update information.

4. The method according to claim 3, characterized in that, The configuration database communicates with a web server, which provides a configuration management page to web clients. The web server updates the configuration database based on the data obtained by the web clients through the configuration management page.

5. The method according to claim 4, characterized in that, The web server is also used for: Receive the base station number and current log level sent by the web client, wherein the base station number is associated with the identifiers of multiple baselines; The identifier of each baseline associated with the base station number and the current log level are treated as a set of data and written or updated in batches to the configuration database.

6. The method according to claim 1 or 2, characterized in that, The configuration update information also includes a validity period, and after setting the log level variable of the baseline solution instance corresponding to the identified instance among the plurality of baseline solution instances to the current log level, it also includes: When the validity period expires, the log level variable will be changed back to its original value from the current log level.

7. A baseline calculation log control device, characterized in that, Applied to a server, the server runs multiple baseline solving instances, each baseline solving instance solves one baseline, and maintains a separate log-level variable for each baseline solving instance; the device includes: Assign a unique identifier to each baseline to decouple the log level of the baseline from the server; bind the log level to a single baseline according to the baseline's identifier; The acquisition module is used to acquire configuration update information, which includes the identifier of the target baseline and the current log level; The variable setting module is used to set the log level variable of the baseline solution instance corresponding to the identifier in the plurality of baseline solution instances to the current log level; A printing module is used to compare the log level variable of the baseline solution instance with preset parameters when the baseline solution instance generates logs, and determine whether to print the logs based on the comparison result; it generates a log printing function and a log comparison function through macro definitions, wherein the log printing function is used to print logs according to the log level, and the log comparison function is used to compare the log level variable of the baseline solution instance with preset parameters, and determine whether to call the log printing function based on the comparison result; and it enables the macro-defined functions when the baseline solution instance is running; The log printing logic includes: comparing the log level variable of the baseline solution instance with preset parameters, and determining whether to print logs based on the comparison result.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Log printing method and device

    CN113778350A