OKR information processing method, device, electronic device and storage medium
By automatically detecting and adjusting the display parameters of the data growth curve and OKR data, automatic layout on the same page is achieved, solving the problem of the existing technology that cannot automatically adjust the arrangement and size, improving printing efficiency and reducing resource waste.
Patent Information
- Application Number
- CN202310718248.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-06-16
AI Technical Summary
Existing printing technology cannot automatically adjust the arrangement and size when printing growth curves and OKR content, resulting in paper waste and increased printing costs, and consuming employee time and energy.
By obtaining the data growth curve and OKR data identified by the target account, the number of curves is automatically detected and the initial template layout information is determined. The display parameters of the data growth curve and OKR data are adjusted to achieve automatic layout and display on the same page.
It improves data integration efficiency, reduces resource waste, facilitates user viewing and printing, and enhances user experience.
Smart Images

Figure CN116719979B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device, electronic device, and storage medium for processing OKR information. Background Art
[0002] In their daily work, employees often use computer software to view and analyze growth curves and OKRs to track project progress and work goals. This software typically offers various features to help employees better understand and manage their work goals. However, these software programs are relatively limited in their printing capabilities, often only supporting separate printing of growth curves and OKRs, or failing to automatically adjust the alignment and size of the printouts, resulting in wasted paper and increased printing costs.
[0003] Furthermore, existing printing technology primarily focuses on print quality, speed, and reliability, with relatively little research focused on saving paper and reducing printing costs. Consequently, in corporate environments, employees often need to manually adjust the alignment and size of growth charts and OKRs to fit them on the same sheet of paper. This not only wastes employee time and energy but also reduces work efficiency. Summary of the Invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a method, device, electronic device and storage medium for processing OKR information.
[0005] According to one aspect of an embodiment of the present application, a method for processing OKR information is provided, including:
[0006] Acquire an information processing task, wherein the information processing task carries at least one target account identifier;
[0007] Query the data growth curve and OKR data corresponding to the target account identifier;
[0008] Detecting the number of curves corresponding to the data growth curve, and determining layout information of an initial template based on the number of curves, wherein the layout information at least includes display parameters corresponding to the data growth curve and the OKR data;
[0009] The data growth curve and the OKR data are loaded into the initial template to obtain the OKR display information corresponding to the target account identifier.
[0010] Furthermore, detecting the number of curves corresponding to the data growth curve and determining layout information of the initial template based on the number of curves includes:
[0011] Detecting the number of curves corresponding to the data growth curve, and comparing the number of curves with a preset number of curves;
[0012] When the number of curves is greater than or equal to the preset number of curves, obtaining the data enhancement curve and the original display parameters corresponding to the OKR data;
[0013] The original display parameters are used as layout information of the initial template.
[0014] Furthermore, when the number of curves is less than the preset number of curves, the method further includes:
[0015] Determining a curve display parameter corresponding to the data growth curve according to the number of curves;
[0016] determining a remaining area of the initial template based on the curve display parameters;
[0017] Obtaining a minimum display area corresponding to the OKR data, and comparing the area height of the minimum display area with the area height corresponding to the remaining area;
[0018] When the area height of the minimum display area is smaller than the area height corresponding to the remaining area, the area parameters of the remaining area are determined as the data display parameters corresponding to the OKR data;
[0019] The layout information of the initial template is determined based on the curve display parameters and the data display parameters.
[0020] Furthermore, determining the curve display parameters corresponding to the data growth curve according to the number of curves includes:
[0021] Dividing the data growth curve according to a preset number range to obtain at least one data growth curve set corresponding to the preset number range, wherein different preset number ranges correspond to different display parameters;
[0022] The display parameters corresponding to the preset number range are determined as curve display parameters of the data growth curve in the data growth curve set.
[0023] Furthermore, obtaining the minimum display area corresponding to the OKR data includes:
[0024] Obtain the current display area corresponding to the OKR data and the length value corresponding to the current display area;
[0025] Calculate the minimum height value of the current display area based on the length of the display area;
[0026] The minimum display area is constructed based on the minimum height value and the length value.
[0027] Furthermore, obtaining the current display area corresponding to the OKR data includes:
[0028] Obtain the data entry corresponding to each OKR element in the OKR data corresponding to the target account;
[0029] The current display area is determined based on the data content in the data entry corresponding to each OKR element.
[0030] Furthermore, the calculating the minimum height value of the current display area based on the length value of the display area includes:
[0031] Get the initial function and constraints;
[0032] Input the constraint condition and the length value into the initial function to obtain the objective function;
[0033] Determining an initial gradient vector, and updating the variables in the objective function according to the initial gradient vector until the gradient vector calculated based on the updated variables meets a preset condition, thereby obtaining an optimal solution corresponding to the objective function;
[0034] The optimal solution is determined as the minimum height value.
[0035] According to another aspect of the embodiments of the present application, there is also provided an OKR information processing device, including:
[0036] an acquisition module, configured to acquire an information processing task, wherein the information processing task carries at least one target account identifier;
[0037] A query module, used to query the data growth curve and OKR data corresponding to the target account identifier;
[0038] a detection module, configured to detect the number of curves corresponding to the data growth curve, and determine target layout information based on the number of curves, wherein the target layout information at least includes display parameters and display positions corresponding to the data growth curve and the OKR data;
[0039] A generation module is used to generate an initial template according to the target layout information, and load the data growth curve and the OKR data into the initial template to obtain the OKR display information corresponding to the target account identifier.
[0040] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0041] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0042] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0043] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages compared with the existing technology: the method provided by the embodiment of the present application automatically layouts the data growth curve and OKR data, and displays the two on the same page, without the user having to manually adjust the display size of the data growth curve and OKR data when calling. The automatic layout method improves the data integration efficiency, and at the same time facilitates user viewing and printing, reducing resource waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0046] Figure 1 A flowchart of a method for processing OKR information provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of a data growth curve provided in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of OKR data provided in an embodiment of the present application;
[0049] Figure 4 A block diagram of a device for processing OKR information provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0052] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0053] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for processing OKR information. The methods provided in the embodiments of the present invention can be applied to any desired electronic device, such as a server, terminal, or other electronic device. These devices are not specifically limited here and, for ease of description, are referred to as electronic devices below.
[0054] According to one aspect of the embodiments of the present application, a method embodiment of a method for processing OKR information is provided. Figure 1 A flowchart of a method for processing OKR information provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:
[0055] Step S11: Acquire an information processing task, wherein the information processing task carries at least one target account identifier.
[0056] The method provided in the embodiments of the present application is applied to a smart device, which can be a device with data processing, data transmission, and data storage functions, such as a mobile phone, computer, iPad, etc. Specifically, a user can perform a login operation on the smart device. The smart device obtains the target account information entered by the user and authenticates the target account information. If the authentication is successful, the login is determined to be successful. At the same time, the corresponding permission information of the account can be obtained, where different permission information corresponds to different OKR data access scopes. The greater the permission, the wider the OKR data access scope.
[0057] In an embodiment of the present application, a user can trigger an information processing task on a smart device. Specifically, the OKR query request triggered by the user is detected, and at least one candidate item is displayed based on the query request. Each candidate item corresponds to a business department, and each candidate item also includes multiple secondary options, and each secondary option corresponds to a business person. At this time, the selection operation acting on the candidate item and / or the secondary option can be detected to determine the selected business department and / or the selected business person. For example, if only the business department is selected, it means that all business persons under the business department are selected at the same time. If the business department and the business person are selected, it means that some of the business persons under the business department are selected.
[0058] Based on this, the target account ID corresponding to the selected business personnel is finally queried, and the target account ID is displayed to detect whether a confirmation operation is triggered. If a confirmation operation is detected, an information processing task is generated based on the target account ID.
[0059] Step S12: query the data growth curve and OKR data corresponding to the target account identifier.
[0060] In the embodiment of the present application, the smart device responds to the information processing task and uses the target account identifier carried to query the data growth curve and OKR data corresponding to the business personnel. Figure 2 As shown, the data growth curve can be a technical experience score curve, a business capability curve, an assessment evaluation curve, etc. OKR data includes: goals, key results, key initiatives, etc. pre-filled by business personnel.
[0061] Step S13: Detect the number of curves corresponding to the data growth curve, and determine the layout information of the initial template based on the number of curves, wherein the layout information at least includes the data growth curve and display parameters corresponding to the OKR data.
[0062] In an embodiment of the present application, detecting the number of curves corresponding to the data growth curve and determining the layout information of the initial template based on the number of curves includes the following steps A1-A3:
[0063] Step A1: detecting the number of curves corresponding to the data growth curve, and comparing the number of curves with the preset number of curves.
[0064] Step A2: When the number of curves is greater than or equal to the preset number of curves, obtain the data enhancement curve and the original display parameters corresponding to the OKR data.
[0065] Step A3: Use the original display parameters as layout information of the initial template.
[0066] In an embodiment of the present application, the smart device detects the number of curves corresponding to the data growth curve. If the number of curves is greater than or equal to the preset number of curves, it means that the conditions for automatic optimization of the layout are not met (that is, the data growth curve and the OKR data cannot be fully displayed on one page). At this time, the original display parameters corresponding to the data enhancement curve and the OKR data can be directly obtained, and the original display parameters can be used as the layout information of the initial template.
[0067] As an example, if the number of curves in the data growth curve is greater than or equal to 10, it needs to be displayed in pages. In this case, the original display parameters are used as the layout information of the initial template.
[0068] In the embodiment of the present application, when the number of curves is less than the preset number of curves, the method further includes the following steps B1-B5:
[0069] Step B1: determining the curve display parameters corresponding to the data growth curve according to the number of curves.
[0070] In an embodiment of the present application, the curve display parameters corresponding to the data growth curve are determined based on the number of curves, including: dividing the data growth curve according to a preset number range to obtain a data growth curve set corresponding to at least one preset number range, wherein the display parameters corresponding to different preset number ranges are different; and determining the display parameters corresponding to the preset number range as the curve display parameters of the data growth curve in the data growth curve set.
[0071] In the embodiment of the present application, the preset number range can be 3. The data growth curve is divided according to the preset number range 3 to obtain three groups of data growth curves, namely data growth curve [1-3], data growth curve [4-6], and data growth curve [7-9]. A preset height is 336px. Data growth curve [1-3] occupies one height: 336px, data growth curve [4-6] occupies two heights: 672px; data growth curve [7-9] occupies three heights: 1008px. The height is the curve display parameter corresponding to the data growth curve.
[0072] Step B2: determining the remaining area of the initial template based on the curve display parameters.
[0073] In an embodiment of the present application, the used area of the initial template can be determined based on the height of the data growth curve obtained above, and then the area outside the used area in the initial template is used as the remaining area.
[0074] Step B3: Obtain the minimum display area corresponding to the OKR data, and compare the area height of the minimum display area with the area height corresponding to the remaining area.
[0075] In an embodiment of the present application, obtaining the minimum display area corresponding to the OKR data includes: obtaining the current display area corresponding to the OKR data, and the length value corresponding to the current display area; calculating the minimum height value of the current display area based on the length of the display area; and constructing the minimum display area based on the minimum height value and the length value.
[0076] In an embodiment of the present application, obtaining the current display area corresponding to the OKR data includes: obtaining the data entries corresponding to each OKR element in the OKR data corresponding to the target account; and determining the current display area based on the data content in the data entry corresponding to each OKR element. For example, the OKR elements include: goals, key results, and key initiatives. Then, the data entries corresponding to the OKR elements are obtained, and there are three data entries corresponding to the goals, three data entries corresponding to the key initiatives, and three data entries corresponding to the key initiatives. Finally, the current display area is determined based on each OKR element and the data content (text or data size) of the corresponding data entries.
[0077] In an embodiment of the present application, the minimum height value of the current display area is calculated based on the length value of the display area, including: obtaining an initial function and constraints; inputting the constraints and the length value into the initial function to obtain an objective function; determining an initial gradient vector, and updating the variables in the objective function according to the initial gradient vector until the gradient vector calculated based on the updated variables meets the preset conditions, thereby obtaining the optimal solution corresponding to the objective function; and determining the optimal solution as the minimum height value.
[0078] Specifically, such as Figure 3 As shown, the contents corresponding to the objectives, key results, and key initiatives can be generated into three rectangles. The area of the rectangle has a fixed value according to the size of the text content. Suppose the three rectangles are A, B, and C, and their areas are fixed S1, S2, and S3 respectively.
[0079] The length and width of rectangle A are variables a and b respectively, the length and width of rectangle B are variables c and d respectively, and the length and width of rectangle C are variables e and f respectively. S1 = a×b, S2 = c×d, S3 = e×f. Finally, the areas of the three rectangles are added together to form a new rectangle, the area of which is set to X. The length of rectangle X is L = a+c+e = 1570px, and the minimum height of rectangle X is H. min=X / L.
[0080] To find the minimum height of the new rectangle, this embodiment uses the Lagrange multiplier method from calculus: First, obtain the constraints and objective function. The constraints are: L = a + c + e. The objective function is to minimize the height H of the new rectangle, where X = S1 + S2 + S3 = a × b + c × d + e × f. Because L is fixed, e can be expressed as Lac.
[0081] Based on this, the area of the new rectangle can be expressed as: X = ab + c × d + (Lac) × f. Since the goal is to minimize H, where H = X / L.
[0082] Then define the Lagrangian function L(a,c,b,d,f,λ)=(a×b+c×d+(Lac)×f) / L-λ×(a+cL). At this time, we need to find the stationary point of L, that is, the partial derivatives of L with respect to a, c, b, d, f, and λ are all zero;
[0083] By calculating the partial derivatives and setting them to zero, a series of equations can be obtained. However, this problem has no explicit solution because there are multiple variables and nonlinear equations. In this case, the embodiment of the application uses a numerical optimization method (such as gradient descent or Newton's method) to solve the optimal solution.
[0084] Specifically, to find the optimal solution to the above problem using gradient descent, we first need to define the objective function and calculate the gradients with respect to variables a, b, c, d, and f. We will then use an iterative method to update the variables until the convergence condition is met. In this problem, the objective function is:
[0085] minimize H = (a × b + c × d + (Lac) × f) / L, subject to a + c = L. Calculate the gradient with respect to a, b, c, d, and f. Since H is a composite function, the chain rule can be used to calculate the gradient. Therefore, the gradient vector is:
[0086]
[0087] Next, initialize the values of variables a, b, c, d, and f. These values should satisfy the constraints. Follow these steps to perform gradient descent:
[0088] First, calculate the gradient vector of the objective function H under the current variable value
[0089] Next, update the variables:
[0090] where α is the learning rate.
[0091] Next, check the convergence condition. If the norm of the gradient vector is less than a predetermined threshold, or the number of iterations exceeds the maximum number of iterations, stop the iteration. Otherwise, continue the iteration.
[0092] Finally, the optimal solution is found and used to calculate the minimum height of the new rectangle: H = X / L = (a × b + c × d + (Lac) × f) / L. The minimum height and length values are then used to construct the minimum display area.
[0093] The method provided in the embodiment of the present application automatically adjusts the display parameters of the data growth curve according to the number of data growth curves, and further layouts the OKR data based on the remaining area of the page, thereby improving the readability and neatness of the OKR information, and achieving a reasonable and beautiful page layout, which is conducive to facilitating users to view and organize relevant information.
[0094] Step B4: When the area height of the minimum display area is smaller than the area height corresponding to the remaining area, the area parameters of the remaining area are determined as the data display parameters corresponding to the OKR data.
[0095] In this embodiment of the present application, the area height of the minimum display area (i.e., the minimum height value) and the remaining height of the page. If the minimum height value is greater than the remaining height of the page, it means that the OKR data cannot be fully displayed in the remaining area and needs to be displayed in pages. If the OKR minimum height value is less than or equal to the remaining height of the page, the area parameters of the remaining area are determined as the data display parameters corresponding to the OKR data, or the area parameters of the minimum display area can also be determined as the data display parameters.
[0096] Step B5: determining the layout information of the initial template based on the curve display parameters and the data display parameters.
[0097] In an embodiment of the present application, after obtaining the curve display parameters of the data growth curve (the display height of each growth curve) and the data display parameters of the OKR data (the length and width of the minimum display area, or the length and width of the remaining area), the above parameters are used to set the initial template to obtain the layout information of the initial template.
[0098] The method provided in this embodiment can automatically arrange and adjust the growth curve and OKR list according to the actual situation, eliminating the need for tedious manual adjustments. In addition, the algorithm can automatically select single-page or double-page printing and proportional scaling, making the printed results both beautiful and practical, improving the user experience.
[0099] Step S14: Load the data growth curve and OKR data into the initial template to obtain the OKR display information corresponding to the target account identifier.
[0100] The method provided in the embodiment of the present application automatically layouts the data growth curve and OKR data and displays them on the same page. There is no need for users to manually adjust the display size of the data growth curve and OKR data when calling. The automatic layout method improves the efficiency of data integration, facilitates user viewing and printing, and reduces resource waste.
[0101] Figure 4 This is a block diagram of an OKR information processing device provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 4 As shown, the device includes:
[0102] An acquisition module 41 is configured to acquire an information processing task, wherein the information processing task carries at least one target account identifier;
[0103] Query module 42, used to query the data growth curve and OKR data corresponding to the target account identifier;
[0104] A detection module 43 is configured to detect the number of curves corresponding to the data growth curve and determine target layout information based on the number of curves, wherein the target layout information includes at least display parameters and display positions corresponding to the data growth curve and the OKR data;
[0105] The generation module 44 is used to generate an initial template according to the target layout information, and load the data growth curve and OKR data into the initial template to obtain the OKR display information corresponding to the target account identifier.
[0106] In an embodiment of the present application, the detection module 43 is used to detect the number of curves corresponding to the data growth curve, and compare the number of curves with the preset number of curves; when the number of curves is greater than or equal to the preset number of curves, the original display parameters corresponding to the data enhancement curve and the OKR data are obtained; and the original display parameters are used as the layout information of the initial template.
[0107] In an embodiment of the present application, the apparatus further includes: a layout processing module, including:
[0108] The first unit is used to determine the curve display parameters corresponding to the data growth curve according to the number of curves;
[0109] The second unit is configured to determine a remaining area of the initial template based on the curve display parameter;
[0110] The third unit is used to obtain the minimum display area corresponding to the OKR data and compare the area height of the minimum display area with the area height corresponding to the remaining area;
[0111] The fourth unit is configured to determine the area parameters of the remaining area as the data display parameters corresponding to the OKR data when the area height of the minimum display area is less than the area height corresponding to the remaining area;
[0112] The fifth unit is configured to determine the layout information of the initial template based on the curve display parameters and the data display parameters.
[0113] In an embodiment of the present application, the first unit is used to divide the data growth curve according to a preset number range to obtain a data growth curve set corresponding to at least one preset number range, wherein the display parameters corresponding to different preset number ranges are different; and the display parameters corresponding to the preset number range are determined as the curve display parameters of the data growth curve in the data growth curve set.
[0114] In an embodiment of the present application, the third unit is used to obtain the current display area corresponding to the OKR data, and the length value corresponding to the current display area; calculate the minimum height value of the current display area based on the length of the display area; and construct the minimum display area based on the minimum height value and the length value.
[0115] In an embodiment of the present application, the third unit is specifically used to obtain data entries corresponding to each OKR element in the OKR data corresponding to the target account; and determine the current display area based on the data content in the data entry corresponding to each OKR element.
[0116] In an embodiment of the present application, the third unit is specifically used to obtain an initial function and constraints; input the constraints and length values into the initial function to obtain an objective function; determine an initial gradient vector, and update the variables in the objective function according to the initial gradient vector until the gradient vector calculated based on the updated variables meets the preset conditions, thereby obtaining the optimal solution corresponding to the objective function; and determine the optimal solution as the minimum height value.
[0117] The present application also provides an electronic device, such as Figure 5 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0118] Memory 1503, used for storing computer programs;
[0119] The processor 1501 is configured to implement the steps of the above embodiment when executing the computer program stored in the memory 1503 .
[0120] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0121] The communication interface is used for communication between the above terminal and other devices.
[0122] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0123] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0124] In another embodiment provided in the present application, a computer-readable storage medium is further provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the method for processing OKR information described in any of the above embodiments.
[0125] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the method for processing OKR information described in any one of the above embodiments.
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive SolidState Disk).
[0127] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.
[0128] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.
Claims
1. A method for processing OKR information, characterized in that: include: Acquire an information processing task, wherein the information processing task carries at least one target account identifier; Query the data growth curve and OKR data corresponding to the target account identifier; Detecting the number of curves corresponding to the data growth curve, and determining layout information of an initial template based on the number of curves, wherein the layout information at least includes display parameters corresponding to the data growth curve and the OKR data; Loading the data growth curve and the OKR data into the initial template to obtain OKR display information corresponding to the target account identifier; The detecting the number of curves corresponding to the data growth curve and determining the layout information of the initial template based on the number of curves includes: detecting the number of curves corresponding to the data growth curve, and comparing the number of curves with a preset number of curves; when the number of curves is less than the preset number of curves, determining the curve display parameters corresponding to the data growth curve according to the number of curves; determining the remaining area of the initial template based on the curve display parameters; obtaining the minimum display area corresponding to the OKR data, and comparing the area height of the minimum display area with the area height corresponding to the remaining area; when the area height of the minimum display area is less than the area height corresponding to the remaining area, determining the area parameters of the remaining area as the data display parameters corresponding to the OKR data; and determining the layout information of the initial template based on the curve display parameters and the data display parameters; The obtaining of the minimum display area corresponding to the OKR data includes: obtaining a current display area corresponding to the OKR data and a length value corresponding to the current display area; calculating a minimum height value of the current display area based on the length of the display area; and constructing the minimum display area based on the minimum height value and the length value; Calculating the minimum height value of the current display area based on the length value of the display area includes: obtaining an initial function and a constraint condition; inputting the constraint condition and the length value into the initial function to obtain an objective function; determining an initial gradient vector, and updating variables in the objective function according to the initial gradient vector until a gradient vector calculated based on the updated variables meets a preset condition, thereby obtaining an optimal solution corresponding to the objective function; and determining the optimal solution as the minimum height value. Among them, the constraints are: L = a + c + e; The objective function is: minimize H = (a × b + c × d + (Lac) × f) / L, subject to a + c = L; Update variables: Where α is the learning rate; Minimum height value: H = X / L = (a×b+c×d+(Lac)×f) / L, the length and width of rectangle A are variables a and b respectively, the length and width of rectangle B are variables c and d respectively, the length and width of rectangle C are variables e and f respectively, and rectangle A, rectangle B and rectangle C represent the contents corresponding to the objectives, key results and key initiatives respectively.
2. The method according to claim 1, characterized in that The detecting the number of curves corresponding to the data growth curve and determining layout information of the initial template based on the number of curves includes: When the number of curves is greater than or equal to the preset number of curves, obtaining the data growth curve and original display parameters corresponding to the OKR data; The original display parameters are used as layout information of the initial template.
3. The method according to claim 1, characterized in that The determining of the curve display parameters corresponding to the data growth curve according to the number of curves includes: Dividing the data growth curve according to a preset number range to obtain at least one data growth curve set corresponding to the preset number range, wherein different preset number ranges correspond to different display parameters; The display parameters corresponding to the preset number range are determined as curve display parameters of the data growth curve in the data growth curve set.
4. The method according to claim 1, wherein Obtain the current display area corresponding to the OKR data, including: Obtain the data entry corresponding to each OKR element in the OKR data corresponding to the target account; The current display area is determined based on the data content in the data entry corresponding to each OKR element.
5. A device for processing OKR information, characterized in that: include: an acquisition module, configured to acquire an information processing task, wherein the information processing task carries at least one target account identifier; A query module, used to query the data growth curve and OKR data corresponding to the target account identifier; a detection module, configured to detect the number of curves corresponding to the data growth curve, and determine target layout information based on the number of curves, wherein the target layout information at least includes display parameters and display positions corresponding to the data growth curve and the OKR data; A generation module, configured to generate an initial template according to the target layout information, and load the data growth curve and the OKR data into the initial template to obtain OKR display information corresponding to the target account identifier; The detection module is used to detect the number of curves corresponding to the data growth curve, and compare the number of curves with a preset number of curves; if the number of curves is less than the preset number of curves, determine the curve display parameters corresponding to the data growth curve according to the number of curves; determine the remaining area of the initial template based on the curve display parameters; obtain the minimum display area corresponding to the OKR data, and compare the area height of the minimum display area with the area height corresponding to the remaining area; if the area height of the minimum display area is less than the area height corresponding to the remaining area, determine the area parameters of the remaining area as the data display parameters corresponding to the OKR data; and determine the layout information of the initial template based on the curve display parameters and the data display parameters; The detection module is configured to obtain a current display area corresponding to the OKR data and a length value corresponding to the current display area; calculate a minimum height value of the current display area based on the length of the display area; and construct the minimum display area based on the minimum height value and the length value; The detection module is configured to obtain an initial function and constraints; input the constraints and the length value into the initial function to obtain an objective function; determine an initial gradient vector, and update variables in the objective function according to the initial gradient vector until a gradient vector calculated based on the updated variables meets a preset condition, thereby obtaining an optimal solution corresponding to the objective function; and determine the optimal solution as the minimum height value; Among them, the constraints are: L = a + c + e; The objective function is: minimize H = (a × b + c × d + (Lac) × f) / L, subject to a + c = L; Update variables: Where α is the learning rate; Minimum height value: H = X / L = (a×b+c×d+(Lac)×f) / L, the length and width of rectangle A are variables a and b respectively, the length and width of rectangle B are variables c and d respectively, the length and width of rectangle C are variables e and f respectively, and rectangle A, rectangle B and rectangle C represent the contents corresponding to the objectives, key results and key initiatives respectively.
6. A storage medium, characterized in that The storage medium includes a stored program, wherein the method according to any one of claims 1 to 4 is executed when the program is executed.
7. An electronic device, characterized in that: The system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: Memory for storing computer programs; A processor, configured to execute the method according to any one of claims 1 to 4 by running a program stored in a memory.
Citation Information
Patent Citations
Test paper typesetting method and system based on mapping table
CN112380816A
Intelligent report generation method and device based on canvas technology, equipment and medium
CN114548036A