Report cell data format conversion method and system
Patent Information
- Application Number
- CN202311551453.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2043-11-20
AI Technical Summary
但在高并发或大数据量导出的情况下,对资源的消耗比较大,就会有明显的效率问题
[0037]本公开实施例中的报表单元格数据格式转换方法,通过该方法能够很好地解决用户需求。此发明技术装置还具有很好的兼容性,可以通过序列化适配前端输出,在报表渲染和输出过程中,只有一个单元格值对象,资源消耗比之前减少了一半不止;同时并发数也明显提高,传输的数据量也明显减少。由于本发明技术按业务对单元格值对象分类和裁剪,当导出数据量特别大时,服务器瞬间内存需要保证。
Smart Images

Figure CN117453627B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of report statistics technology, and in particular to a method and system for converting report cell data formats. Background Technology
[0002] In the process of enterprise internet development, each business module needs to develop its own business reports. Therefore, the product department proposed that the report design of all microservices should be consistent and the style should be unified. Thus, it is necessary to develop various report development tools, services, and report display components in a unified manner.
[0003] Report models allow users to extend columns and set cell data formats, styles, and conditional formatting. Since report display was implemented first, followed by export and printing, styles and conditional formatting, previously implemented on the front-end, were migrated to the back-end to ensure product consistency. However, since cell data formats were already defined, a new set of objects was created during refactoring to ensure query stability. During conversion, the data object is first assigned to the new object, and after processing, it is assigned back to the cell object. This design didn't cause efficiency issues during small-volume queries, and is the standard design for most reports in the industry. However, under high concurrency or large-volume data export scenarios, resource consumption becomes significant, leading to noticeable efficiency problems. Summary of the Invention
[0004] In view of this, the present disclosure provides a method for converting report cell data format, which at least partially solves the problems existing in the prior art.
[0005] In a first aspect, embodiments of this disclosure provide a method for converting report cell data formats, the method comprising the following steps:
[0006] After retrieving the data, create a cell value object to receive the values assigned in the query.
[0007] The original rendering object and the cell value object are merged into a new cell value object;
[0008] The new cell value objects are categorized according to business functions and abstracted based on business reports;
[0009] Based on the queried data, assign values to the basic properties of the new cell value object, and assign values to the properties of the corresponding business sub-objects according to the business report;
[0010] After an object is assigned a value, related business logic needs to be processed. After the business logic is completed, the object's attributes are first processed by algorithmic logic, and then serialized to ensure that the data is consistent with the previously serialized data structure.
[0011] The relevant business includes at least one of the following: precision processing, conditional formatting processing, and style processing.
[0012] According to a specific implementation of an embodiment of this disclosure, the method further includes:
[0013] The cell value object is used during querying, printing, and file exporting;
[0014] Create different business sub-objects for different business reports.
[0015] According to a specific implementation of an embodiment of this disclosure, merging the original rendering object and the cell value object into a new cell value object further includes the following steps:
[0016] Merge object attributes and remove pre-defined unnecessary attributes; the unnecessary attributes include at least one of the following: cell column width, formula, cell font color, whether the font is bold, index, whether the cell is merged, whether the height of the merged cell needs to be calculated when printing, and cell prefix;
[0017] Convert the original design properties in the new cell value object into methods;
[0018] After merging objects, delete the pre-defined unused constructors; the unused constructors include at least one of CellInfo(Booleanle, Integerlv) and CellInfo(Integerlv, String v, String code, StringshowCode).
[0019] According to a specific implementation of an embodiment of this disclosure, the abstract business sub-object includes: a free report sub-object, an export print sub-object, an aggregation sub-object, and a tree sub-object.
[0020] Secondly, embodiments of this disclosure provide a report cell data format conversion system, the system comprising:
[0021] The sub-object creation module, after being configured to query data, creates cell value objects to prepare for receiving the values assigned in the query.
[0022] The merge module is configured to merge the original rendered object and the cell value object into a new cell value object.
[0023] The abstract module is configured to categorize the new cell value objects according to business functions and abstract them based on business reports.
[0024] The assignment module is configured to assign values to the basic properties of new cell value objects based on the queried data, and to assign values to the properties of corresponding business sub-objects based on the business report.
[0025] The serialization module is configured to handle related business logic after object assignment. After the business logic is completed, the object's attributes are first processed by algorithm logic, and then serialized to ensure that the data is consistent with the previously serialized data structure.
[0026] The relevant business includes at least one of the following: precision processing, conditional formatting processing, and style processing.
[0027] According to a specific implementation of an embodiment of this disclosure, the system further includes:
[0028] The deletion module is configured to merge object attributes and remove preset unwanted attributes; the unwanted attributes include at least one of the following: cell column width, formula, cell font color, whether the font is bold, index, whether the cell is merged, whether the height of the merged cell needs to be calculated when printing, and cell prefix;
[0029] Convert the existing design properties in the new cell value object into methods; and
[0030] After merging objects, delete the pre-defined unused constructors; the unused constructors include at least one of CellInfo(Booleanle, Integerlv) and CellInfo(Integerlv, String v, String code, StringshowCode).
[0031] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0032] At least one processor; and,
[0033] A memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, cause the at least one processor to perform the report cell data format conversion method described in any of the first aspects or any implementations thereof.
[0035] Fourthly, embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions that, when executed by at least one processor, cause the at least one processor to perform the report cell data format conversion method in the first aspect or any implementation thereof.
[0036] Fifthly, embodiments of this disclosure also provide a computer program product, the computer program product including a computing program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the report cell data format conversion method in the first aspect or any implementation thereof.
[0037] The report cell data format conversion method in this embodiment effectively addresses user needs. This invention also boasts excellent compatibility, adapting to front-end output through serialization. During report rendering and output, only one cell value object exists, reducing resource consumption by more than half compared to previous methods; simultaneously, concurrency is significantly increased, and the amount of data transmitted is significantly reduced. However, because this invention categorizes and trims cell value objects according to business logic, server memory must be guaranteed when exporting exceptionally large amounts of data. Attached Figure Description
[0038] The above is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] Figure 1 This is a schematic diagram of a report request data flow in the prior art provided by an embodiment of the present disclosure;
[0040] Figure 2 A flowchart of a method for converting report cell data format provided in this embodiment of the present disclosure;
[0041] Figure 3 A schematic diagram comparing the cell object serialization process of this application and the prior art is provided as an embodiment of this disclosure;
[0042] Figure 4 This is a schematic diagram illustrating a method for converting report cell data format according to an embodiment of the present disclosure;
[0043] Figure 5 A schematic diagram of a report cell data format conversion system provided in this disclosure embodiment; and
[0044] Figure 6 A schematic diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0045] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0046] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0047] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0048] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0049] Business reports, as the name suggests, refer to charts or tables that statistically analyze data from business processes. Different industries and organizations have different business natures and content, resulting in a wide variety of business reports. Business reports are self-made reports within an organization, lacking a unified format and content; each organization compiles them according to its own management needs. To address the flexibility of customizing business reports and organizing business data, most companies provide a report design tool to design and generate report models, which are then parsed, rendered, and generated by a report engine. However, the most complex and performance-intensive part of this process is handling cell data formats, styles, and conditional formatting. Different modules use different objects during design, leading to a significant increase in the number of objects generated during export or printing, all of which are large objects. Therefore, the concurrency of reports cannot be increased, and significant resources are consumed, resulting in long service garbage collection times and a poor user experience. Generally, vendors require users to add resources to solve existing problems, and we initially followed this approach. However, through continuous practice and verification, we innovatively solved the problem of users quickly exporting and printing reports, achieving rapid report export under the same resource conditions. To meet customer needs, a device and method can be used to create cell value objects on demand and classify object structures according to business requirements. This technology can not only solve the performance problems of exporting and printing business reports, but also reduce data transmission and object creation, and save garbage collection time.
[0050] The existing technical solution queries data and writes it into rendered cell value objects. Then, when processing styles and conditional formatting, it first converts the data back into cell value objects; these are in a one-to-one relationship. After processing the data with cell value objects, it handles file output and printing. During query output, the returned value is converted and displayed on the web front-end query page. The front-end retrieves the data and performs rendering. The schematic diagram of the existing technical solution is shown below. Figure 1 As shown, it includes the following steps:
[0051] 1. Retrieve data from the current page that meets the query criteria in the report;
[0052] 2. Create cell objects during rendering and assign values to the cell data;
[0053] 3. When processing data formats, styles, or conditional formatting, it is also necessary to create an object to receive the data object created during rendering;
[0054] 4. After processing the format, style, and conditional formatting, convert the data back to cell data and then output it to the page;
[0055] 5. If it is an exported file, the file needs to be generated first, then uploaded to the file server, and then the file address is returned. The front end opens the file according to the file address.
[0056] The above technical solution creates two cell data objects for each cell after data querying, and these two data objects have a one-to-one relationship, resulting in duplicate creation. Because two data objects are recreated, two data transformations are required, such as... Figure 1 As described in ①②, data queries will result in the creation of a large number of objects, and even double the number of objects, which will cause a large number of objects to be created instantly, resulting in high memory consumption and long garbage collection time.
[0057] Because the above solution requires creating two similar objects each time the report is rendered and displayed, and also creates one for each cell, it consumes a large amount of memory. When the data volume is large, the report execution time is relatively long, which also increases the memory usage time, causing objects to move from the young generation to the old generation. Due to the large number of objects, the garbage collection time is relatively long, resulting in the report opening being particularly slow.
[0058] To address the issues of report opening efficiency and the creation of numerous objects, which frequently leads to garbage collection problems, this application proposes a new solution, such as... Figure 2 As shown, each time a report is opened, only one cell data object is created. The object's attributes are abstracted according to business logic, ensuring that each cell only has necessary attributes and no design attributes or other business attributes, or redundant attributes. This results in fewer attributes created per cell and a smaller object size. On one hand, this reduces the memory usage of objects; on the other hand, it reduces the number of objects created by half. Especially after abstracting objects by business logic, approximately 70% of memory overhead can be saved each time the report is opened. This improves the efficiency of report querying and exporting while reducing memory consumption.
[0059] like Figure 3 The diagram shows a comparison between this application and existing technologies. In addition to extracting and merging objects according to business requirements, the new implementation also needs to be compatible with data output. In order to achieve compatibility with the output data, processing was performed during the object serialization process.
[0060] The proposed solution creates cell value objects after data retrieval. During rendering, these objects are assigned values, and no new objects are created when handling formatting, styles, precision, and conditional formatting. Only the object's property values are modified during processing. The new cell value objects are consistently used for printing and exporting, and the entire process involves only these objects. To ensure the abstracted cell value objects are compatible with the front-end, algorithmic logic is applied to them to ensure that object serialization and deserialization are consistent with the previous data, thus improving the performance of report querying, exporting, and printing.
[0061] Figure 4This is a schematic diagram of the report cell data format conversion method provided in the embodiments of this disclosure.
[0062] like Figure 4 As shown, in step S410, after querying the data, a cell value object is created to prepare to receive the assigned values from the query.
[0063] In this embodiment of the invention, the method further includes: using the cell value object during querying, printing, and file export; and creating different business sub-objects for different business reports.
[0064] More specifically, the creation and use of objects include:
[0065] After retrieving the data, create a cell value object to receive the values assigned in the query;
[0066] The objects created above will be used during querying, printing, and file exporting processes, and no new similar objects will be created.
[0067] More specifically, we now proceed to step S420.
[0068] In step S420, the original rendering object and the cell value object are merged into a new cell value object.
[0069] In this embodiment of the invention, merging the original rendering object and the cell value object into a new cell value object further includes the following steps: merging object attributes and removing preset unnecessary attributes; the unnecessary attributes include at least one of the following: cell column width (colWidth), formula (fml), cell font color (fontColor), font weight (fontWeight), index (index), whether the cell is merged (merged), whether the height of the merged cell needs to be calculated when printing (needHeight), cell prefix (pf); converting the original design attributes in the new cell value object into methods; after merging the objects, deleting preset useless constructors; the useless constructors include at least one of the following: CellInfo(Boolean le, Integerlv), CellInfo(Integerlv, String v, String code, String showCode).
[0070] More specifically, the object's properties and constructors are merged, including:
[0071] 1. Merge the original rendering objects and cell value objects into a new cell value object, merge object properties, and remove unnecessary properties;
[0072] 2. Delete the original design properties from the new cell value object and replace them with a method;
[0073] 3. After merging objects, unused constructors are deleted;
[0074] This application differs from existing technologies in its handling of cell objects. In existing solutions, an object needs to be created once during rendering, and a similar cell value object needs to be created again to handle styles, formats, etc., and values need to be retrieved and assigned multiple times. This application only creates a cell value object once and only changes the value of the current object.
[0075] Next, proceed to step S430.
[0076] In step S430, the new cell value objects are categorized according to business functions and abstracted based on business reports.
[0077] In this embodiment of the invention, the abstract business sub-objects include: free report sub-object, export print sub-object, aggregation sub-object, and tree sub-object.
[0078] More specifically, objects are abstracted according to business logic, including:
[0079] 1. To reduce the size of cell objects, objects are categorized according to business functions;
[0080] 2. Based on different business report abstractions, the main extracted sub-objects include: free report sub-object, export and print sub-object, aggregate sub-object, and tree sub-object, etc.
[0081] This application differs from existing technologies in its approach to cell structure processing. In existing solutions, cell object attributes are a flat set of attributes; in this application, cell object attributes are basic attributes and a collection of sub-object attributes categorized by business logic.
[0082] Next, proceed to step S440.
[0083] In step S440, based on the queried data, the basic attributes of the new cell value object are assigned values, and the attributes of the corresponding business sub-objects are assigned values according to the business report.
[0084] More specifically, object assignment includes:
[0085] Based on the queried data, assign values to the basic properties of the new cell value object;
[0086] Then, assign values to the corresponding business sub-object attributes according to different business reports;
[0087] This application differs from existing technologies in its memory usage per cell. In existing solutions, each time cell data is assigned a value, the corresponding object properties are assigned values, which loads unnecessary properties, resulting in significant memory usage. This application assigns values to basic properties and creates sub-objects based on business logic for assignment, thus minimizing memory consumption.
[0088] Next, proceed to step S450.
[0089] In step S450, after the object is assigned a value, related business needs to be processed. After the business processing is completed, the object's attributes are first processed by algorithm logic, and then serialized to ensure that the data is consistent with the previously serialized data structure.
[0090] The relevant business includes at least one of the following: precision processing, conditional formatting processing, and style processing.
[0091] More specifically, the serialization process includes:
[0092] 1. When objects are not merged, the data is returned using the default serialization performed by the Spring framework.
[0093] After an object is assigned a value, related business logic needs to be processed. After the business logic is completed, the object's attributes are first processed by algorithmic logic, and then serialized to ensure that the data is consistent with the previously serialized data structure.
[0094] 2. After serialization, the receiving end is unaware of it and does not need to process it;
[0095] This application differs from existing technologies in its serialization method. In existing solutions, the rendered object is assigned multiple times before serialization; this application only assigns a value to the new cell object and then processes it through algorithmic logic to ensure that the serialized data is consistent with the previous object data.
[0096] Performance check report:
[0097]
[0098]
[0099]
[0100] The report cell data format conversion method proposed in this invention aims to achieve on-demand creation and report cell data format conversion. This application merges business report rendering value objects and cell value objects, then extracts them according to business categories, and finally ensures the consistency of the serialized data object structure. Analysis shows that the business report rendering object and the cell value object have a one-to-one relationship, and most attributes of the two objects are identical. After merging the objects, design class attributes can be uniformly read from the model, and attributes can be deleted. According to business division, report attributes can be divided into business attributes and basic attributes. Therefore, object attributes can be extracted according to business, significantly reducing the number of cell attributes and better addressing customer issues. The main problem this invention aims to solve is:
[0101] The business report rendering object and the cell value object are merged into a single object;
[0102] 2. Delete the design class properties and unused properties of the cell object;
[0103] 3. After merging objects, as long as the getter attribute is converted into a method, the attribute is deleted;
[0104] 4. Properties that do not need to be output to the front end should be set not to be serialized;
[0105] 5. Categorize cell value objects according to business functions and extract relevant business objects;
[0106] 6. Merge the attributes of the summary column and process them according to the enumeration;
[0107] 7. Merge the constructor functions of the merged cell value objects;
[0108] 8. Abstract business sub-objects should be initialized as needed;
[0109] 9. Serialize the merged cell value object into the original value object to ensure consistent output data;
[0110] 10. Adjusting and modifying attributes with different semantic meanings, etc.
[0111] Figure 5 The present invention illustrates a report cell data format conversion system 500, which includes a sub-object creation module 510, a merging module 520, an abstraction module 530, an assignment module 540, and a serialization module 550.
[0112] The sub-object creation module 510 is used to create cell value objects after querying data, in preparation to receive the values assigned by the query.
[0113] The merging module 520 is used to merge the original rendering object and the cell value object into a new cell value object;
[0114] Abstract module 530 is used to classify the new cell value objects according to business and abstract them according to business reports;
[0115] The assignment module 540 is used to assign values to the basic properties of new cell value objects based on the queried data, and to assign values to the properties of corresponding business sub-objects according to the business report;
[0116] The serialization module 550 is used to process related business logic after object assignment. After the business logic is completed, the object's attributes are first processed by algorithm logic, and then serialized to ensure that the data is consistent with the previously serialized data structure.
[0117] The relevant business includes at least one of the following: precision processing, conditional formatting processing, and style processing.
[0118] In this embodiment of the invention, the system further includes:
[0119] The deletion module is used to merge object attributes and remove preset unwanted attributes; the unwanted attributes include at least one of the following: cell column width, formula, cell font color, whether the font is bold, index, whether the cell is merged, whether the height of the merged cell needs to be calculated when printing, and cell prefix;
[0120] Convert the existing design properties in the new cell value object into methods; and
[0121] After merging objects, delete any pre-defined unused constructors; the unused constructors include at least one of CellInfo(Boolean le, Integer lv) and CellInfo(Integerlv, String v, String code, StringshowCode).
[0122] See Figure 6 This disclosure also provides an electronic device 60, which includes:
[0123] At least one processor; and,
[0124] The memory is communicatively connected to the at least one processor; wherein,
[0125] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the report cell data format conversion method in the foregoing method embodiments.
[0126] This disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the report cell data format conversion method in the foregoing method embodiments.
[0127] This disclosure also provides a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the report cell data format conversion method in the foregoing method embodiments.
[0128] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an electronic device 60 suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0129] like Figure 6 As shown, electronic device 60 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of electronic device 60. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0130] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 60 to communicate wirelessly or wiredly with other devices to exchange data. Although an electronic device 60 with various devices is shown in the figure, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0131] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0132] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0133] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0134] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire at least two Internet Protocol (IP) addresses; send a node evaluation request including the at least two IP addresses to a node evaluation device, wherein the node evaluation device selects an IP address from the at least two IP addresses and returns it; and receive the IP address returned by the node evaluation device; wherein the acquired IP address indicates an edge node in a content delivery network.
[0135] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receive a node evaluation request including at least two Internet Protocol (IP) addresses; select an IP address from the at least two IP addresses; and return the selected IP address; wherein the received IP address indicates an edge node in the content delivery network.
[0136] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0138] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0139] It should be understood that the various parts of this disclosure can be implemented in hardware, software, firmware, or a combination thereof.
[0140] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for converting data format in report cells, characterized in that, The method includes the following steps: After retrieving the data, create a cell value object to receive the values assigned in the query. The original rendering object and the cell value object are merged into a new cell value object; The new cell value objects are categorized according to business functions and abstracted based on business reports; Based on the queried data, assign values to the basic properties of the new cell value object, and assign values to the properties of the corresponding business sub-objects according to the business report; After the object is assigned a value, the relevant business logic is processed. After the business logic is completed, the object's attributes are processed by algorithm logic first, and then serialized to ensure that the data is consistent with the previously serialized data structure. The relevant business includes at least one of the following: precision processing, conditional formatting processing, and style processing.
2. The report cell data format conversion method according to claim 1, characterized in that, The method further includes: The cell value object is used during querying, printing, and file exporting; Create different business sub-objects for different business reports.
3. The report cell data format conversion method according to claim 1, characterized in that, The step of merging the original rendering object and the cell value object into a new cell value object also includes the following steps: Merge object attributes and remove pre-defined unnecessary attributes; the unnecessary attributes include at least one of the following: cell column width, formula, cell font color, whether the font is bold, index, whether the cell is merged, whether the height of the merged cell needs to be calculated when printing, and cell prefix; Convert the original design properties in the new cell value object into methods; After merging objects, delete any pre-defined unused constructors; the unused constructors include at least one of CellInfo(Boolean le, Integer lv) and CellInfo(Integerlv, String v, String code, StringshowCode).
4. The report cell data format conversion method according to claim 1, characterized in that, The abstract business sub-objects include: free report sub-object, export print sub-object, aggregate sub-object, and tree sub-object.
5. A report cell data format conversion system, characterized in that, The system includes: The sub-object creation module, after being configured to query data, creates cell value objects to prepare for receiving the values assigned in the query. The merge module is configured to merge the original rendered object and the cell value object into a new cell value object. The abstract module is configured to categorize the new cell value objects according to business functions and abstract them based on business reports. The assignment module is configured to assign values to the basic properties of new cell value objects based on the queried data, and to assign values to the properties of corresponding business sub-objects based on the business report. The serialization module is configured to handle related business logic after object assignment. After the business logic is completed, the object's attributes are first processed by algorithm logic, and then serialized to ensure that the data is consistent with the previously serialized data structure. The relevant business includes at least one of the following: precision processing, conditional formatting processing, and style processing.
6. The report cell data format conversion system according to claim 5, characterized in that, The system also includes: The deletion module is configured to merge object attributes and remove preset unwanted attributes; the unwanted attributes include at least one of the following: cell column width, formula, cell font color, whether the font is bold, index, whether the cell is merged, whether the height of the merged cell needs to be calculated when printing, and cell prefix; Convert the existing design properties in the new cell value object into methods; and After merging objects, delete any pre-defined unused constructors; the unused constructors include at least one of CellInfo(Boolean le, Integer lv) and CellInfo(Integerlv, String v, String code, StringshowCode).
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, cause the at least one processor to perform the report cell data format conversion method as described in any one of claims 1 to 4.
8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions that, when executed by at least one processor, cause the at least one processor to perform the report cell data format conversion method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Report filling and displaying method based on Excel template and front-end interaction
CN116611412A
Conversion Solar Cell
US20090255577A1