Front-end data processing method and device, electronic equipment and storage medium
By obtaining business requirement information in the front-end data processing method and populating it into a preset message table, the problem of long time consumption for view data conversion and binding is solved, thereby shortening the front-end development time and improving efficiency.
Patent Information
- Application Number
- CN202211105825.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-09-09
AI Technical Summary
In front-end development, view data transformation and binding take up a lot of time, leading to an increase in development time.
By acquiring business requirement information, populating it into a preset message table, and sending the information to be displayed to the front end according to the binding rules, the need for view data conversion and binding is reduced.
It effectively shortens front-end development time and improves development efficiency.
Smart Images

Figure CN115712792B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of front-end, and particularly relates to a front-end data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] A front-end business system or an APP is a common way for data to reach business users. The main work of front-end business development is concentrated in the interpretation of background data and the binding of data and UI in two steps. At present, in the development process, the front-end development agrees with the data protocol of the business background. After the front-end initiates a request to the background and obtains data, the corresponding view data is converted according to the product requirements, and then the view data is bound to the UI node. In this development process, the development process of view data conversion and binding occupies a large part of the entire front-end development time, thereby increasing the entire development time. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a front-end data processing method and device, electronic equipment and storage medium, which aims to reduce the front-end development time.
[0004] To achieve the above purpose, a first aspect of an embodiment of the present application provides a front-end data processing method, which comprises:
[0005] obtaining business requirement information;
[0006] obtaining to-be-displayed information according to the business requirement information, the to-be-displayed information comprising to-be-displayed background information, to-be-displayed business data and region information corresponding to the to-be-displayed business data;
[0007] filling the to-be-displayed information into a preset message table;
[0008] obtaining request information sent by a front end;
[0009] determining a preset message table corresponding to the request information as a target message table;
[0010] sending the target message table to the front end, so that the front end displays information according to the to-be-displayed information in the target message table.
[0011] In some embodiments, the filling of the to-be-displayed information into the preset message table comprises:
[0012] judging a canvas container type in the preset message table;
[0013] obtaining a binding rule of a canvas container corresponding to the canvas container type;
[0014] filling the to-be-displayed information into the canvas container according to the binding rule.
[0015] In some embodiments, the determining the canvas container type in the preset message table comprises:
[0016] The number of canvas containers in the preset message table is determined, and the number of canvas containers includes at least one.
[0017] The canvas container type corresponding to each canvas container is determined, and the canvas container type includes a table and an image, and the image includes a column chart and a pie chart.
[0018] In some embodiments, the filling the to-be-displayed information into the canvas container according to the binding rule comprises:
[0019] The first filling rule and the second filling rule of the canvas container are determined according to the binding rule, the first filling rule is used to define the filling order from top to bottom in the canvas container, and the second filling rule is used to define the filling order from left to right in the canvas container.
[0020] The target filling position of the to-be-displayed information in the canvas container is determined according to the first filling rule and the second filling rule.
[0021] The to-be-displayed information is filled into the target filling position.
[0022] In some embodiments, the filling the to-be-displayed information into the canvas container according to the binding rule comprises:
[0023] The third filling rule and the fourth filling rule of the canvas container are determined according to the binding rule, the third filling rule is used to define the original field filling position in the canvas container, and the fourth filling rule is used to define the decoration field filling position in the canvas container.
[0024] The field type of the to-be-displayed information is determined.
[0025] When the field type belongs to the original field type, the to-be-displayed information is filled into the original field filling position.
[0026] When the field type belongs to the decoration field type, the to-be-displayed information is filled into the decoration field filling position.
[0027] In some embodiments, the preset message table corresponding to the request information is determined as the target message table, which comprises:
[0028] The request information is processed by word segmentation, and the word segmentation processing includes synonym replacement or stop word removal.
[0029] The brief information of the preset message table is obtained.
[0030] calculating a relevance between the request information processed by word segmentation and the brief information;
[0031] determining a target message table from a plurality of preset message tables according to the relevance.
[0032] In some embodiments, when the canvas container type is a table, the information display according to the to-be-displayed information in the target message table comprises:
[0033] obtaining to-be-displayed information of each row of the table as target display information;
[0034] adjusting display content of a corresponding display module according to the target display information;
[0035] displaying information according to the adjusted display content.
[0036] To achieve the above object, a second aspect of the embodiment of the present application provides a front-end data processing device, which comprises:
[0037] a first obtaining module configured to obtain service requirement information;
[0038] a second obtaining module configured to obtain to-be-displayed information according to the service requirement information, the to-be-displayed information comprising to-be-displayed background information, to-be-displayed service data and region information corresponding to the to-be-displayed service data;
[0039] a filling module configured to fill the to-be-displayed information into a preset message table;
[0040] a third obtaining module configured to obtain request information sent by a front end;
[0041] a determining module configured to determine a preset message table corresponding to the request information as a target message table;
[0042] a sending module configured to send the target message table to the front end, so that the front end displays information according to to-be-displayed information in the target message table.
[0043] To achieve the above object, a third aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the front-end data processing method of the first aspect when executing the computer program.
[0044] To achieve the above object, a fourth aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the front-end data processing method of the first aspect when executed by a processor.
[0045] The front-end data processing method and device, electronic equipment and storage medium provided by the present application can obtain to-be-displayed information according to service requirement information, fill the to-be-displayed information into a preset message table, and then send the preset message table corresponding to the request information to the front end when sending the request information, so that the front end can display information according to the to-be-displayed information in the target message table, without the need for a developer to bind the data obtained by the request and view data in advance in the front end, thereby effectively reducing the front-end development time. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 is a flowchart of a front-end data processing method provided by an embodiment of the present application;
[0047] Figure 2 is a flowchart of step S130 in the embodiment of the present application Figure 1
[0048] Figure 3 is a flowchart of step S1301 in the embodiment of the present application Figure 2
[0049] Figure 4 is a flowchart of step S1303 in the embodiment of the present application Figure 2
[0050] Figure 5 is a structural schematic diagram of a preset message table provided by an embodiment of the present application;
[0051] Figure 6 is another flowchart of step S1303 in the embodiment of the present application Figure 2
[0052] Figure 7 is a flowchart of step S150 in the embodiment of the present application Figure 1
[0053] Figure 8 is a structural schematic diagram of a front-end data processing device provided by an embodiment of the present application;
[0054] Figure 9 is a hardware structural schematic diagram of an electronic equipment provided by an embodiment of the present application;
[0055] Figure 10 is a module schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0057] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", and the like in the specification and claims and the above-described drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0059] The embodiments of the present application provide a front-end data processing method and device, electronic equipment and storage medium, aiming to reduce the front-end development time.
[0060] The processing method and device, electronic equipment and storage medium provided by the embodiments of the present application are specifically described by the following embodiments. First, the processing method in the embodiments of the present application is described.
[0061] The front-end data processing method provided by the embodiments of the present application relates to the technical field of front-end. The front-end data processing method provided by the embodiments of the present application can be applied to a terminal corresponding background processor, and can also be applied to a server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms; the software can be an application that implements the front-end data processing method, but is not limited to the above forms.
[0062] The application is operable in a variety of generic or specific computer system environments or configurations. For example: personal computer, server computer, handheld or laptop device, tablet device, multiprocessor system, microprocessor-based system, set-top box, programmable consumer electronics, network PC, minicomputer, mainframe computer, distributed computing environments that include any of the above systems or devices, and the like. The application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0063] It should be noted that in each specific embodiment of the present application, when it is necessary to process relevant data related to the identity or characteristics of the user according to user information, user behavior data, user history data, and user location information, etc., the user's permission or consent will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards of the country and region. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiments of the present application to normally operate will be obtained.
[0064] Figure 1 is an optional flowchart of the processing method of the front-end data provided by the embodiments of the present application, Figure 1 The method in step S110 to step S160.
[0065] Step S110, obtaining service requirement information.
[0066] In the embodiment of the present application, the service demand information can include one type of request information, or can include multiple types of request information. For example, in the insurance field, the service demand information can be request information for obtaining data such as insurance type, number of insurance transactions within one year, and insurance personnel type; in the medical field, the service demand information can be request information for obtaining data such as hospital introduction information and medical personnel data of each hospital; and in the financial field, the service demand information can be request information for obtaining data such as stock transaction information within a period of time, securities transaction information, and number of participants in transactions. The service demand information of the embodiment can be request information sent by the front end to the back end or server after the relevant personnel input corresponding data on the front end interface. For example, when the relevant personnel need to sort insurance transaction data, the relevant personnel can input words such as "insurance" and "transaction" on the front end interface, and the front end sends "insurance transaction data" as the service demand information to the back end according to the information.
[0067] In step S120, the information to be displayed is obtained according to the service demand information.
[0068] In the embodiment of the present application, the information to be displayed includes background information to be displayed, service data to be displayed, and region information corresponding to the service data to be displayed. For example, in an insurance scenario, after the front end sends "insurance transaction data" as the service demand information to the back end, the back end can obtain insurance service data within a period of time, such as total insurance transaction amount, number of transactions, maximum transaction amount, and the like, from other associated websites or servers, and at the same time, the back end obtains display background information of the insurance service data and region information for display on the front end. The display background information is used to limit the background type of the service data to be displayed when displayed on the front end interface, and the region information is used to limit the position of the service data to be displayed when displayed on the front end interface. For example, when the display background information is a blue background, the position corresponding to the background of the service data to be displayed when displayed on the front end interface is blue; and when the display background information is a blue gradient background, the position corresponding to the background of the service data to be displayed when displayed on the front end interface is a gradient blue.
[0069] In step S130, the information to be displayed is filled into a preset message table.
[0070] In the embodiment of the present application, the preset message table can adopt an Excel table, or can adopt other tables, and the embodiment is not limited specifically. Taking the Excel table as an example, the embodiment can correspond one front-end page to one table. Since the front-end interface is composed of a plurality of display modules, the embodiment can set a plurality of sheets in the Excel table, and each sheet corresponds to the content of one display module. Taking a financial scenario as an example, the front-end interface includes a chart display module and a text display module, and then two sheets can be set in the Excel table, one sheet corresponds to the content of the chart display module, and one sheet corresponds to the content of the text display module. Therefore, after the background receives the business requirement information sent by the front end, the data about the current financial scenario is obtained from the related website or browser, and then the data is automatically filled into the corresponding positions of the two sheets, so that when the subsequent business front end sends the request information, the display content of the front-end interface can be directly adjusted through the Excel table, without the need for the developer to perform data conversion and binding setting again in the front end.
[0071] In step S130 of some embodiments, as shown in Figure 2 The step of filling the to-be-displayed information into the preset message table can include, but is not limited to, steps S1301 to S1303.
[0072] In step S1301, the type of the canvas container in the preset message table is judged.
[0073] In the embodiment of the present application, one preset message table can be regarded as a linear container, the linear container can internally build one sheet, or can internally build a plurality of sheets, and each sheet can be regarded as a canvas container. One linear container has an associated relationship with one front-end interface, and the associated relationship makes the to-be-displayed information filled in the linear container can adjust the display content of the corresponding front-end interface. When a plurality of canvas containers are set in one linear container, each canvas container has an associated relationship with one display module in the corresponding front-end interface, and the associated relationship makes the to-be-displayed information filled in each canvas container can adjust the display content of the corresponding display module. In the embodiment, different types of canvas containers are used to adjust the real-time display information of different display contents on the front-end interface. Taking an example, when the preset message table includes a key indicator canvas container and a column chart canvas container, the information in the key indicator canvas container can adjust the content of the display module for displaying key indicators on the front-end interface, and the information in the column chart canvas container can adjust the content of the display module for displaying column charts on the front-end interface.
[0074] In step S1301 of some embodiments, as shown in Figure 3As shown, the step of determining the canvas container type in the preset message table can include but is not limited to steps S13011 to S13012.
[0075] Step S13011, determine the number of canvas containers in the preset message table.
[0076] In the embodiment of the present application, after the to-be-displayed information is obtained, the preset message table to be filled can be determined according to the to-be-displayed information. Then the worksheet name in the preset message table is obtained, and the number of canvas containers is determined through the worksheet name. It can be understood that the preset worksheet name can be recognized and classified by a semantic recognition model. Illustratively, after the preset message table is determined, each worksheet name in the preset message table is extracted, and then all the recognized worksheet names are input into the semantic recognition model. The semantic recognition model recognizes the semantic information of each worksheet name, determines whether there is a worksheet name with the same semantic information, and classifies the worksheet names with the same semantic information into one worksheet name. Then the number of all different semantic worksheet names is counted, and the counted number of worksheet names is taken as the number of canvas containers. In the embodiment, the number of canvas containers in the preset message table can be one, two or more.
[0077] Step S13012, determine the canvas container type corresponding to each canvas container.
[0078] In the embodiment of the present application, after the number of canvas containers in the preset message table is determined, the type of each canvas container is analyzed in turn. It can be understood that the type of each canvas container can be determined according to the worksheet name corresponding to the canvas container, or according to the filling position form used in each canvas container. Illustratively, when the type is determined according to the worksheet name, the semantic information recognized by the semantic recognition model can be used to determine the type; when the type is determined according to the filling position form used in the canvas container, the filling form of each canvas container is obtained in turn, for example, the boundary line of each filling position is obtained, and the type of each canvas container is determined according to all the boundary lines. It can be understood that the canvas container type can include tables and images, and the images include column charts and pie charts. Taking the table as an example, the boundary line of each filling position is obtained, and the shape composed of all the boundary lines is used to determine that the current canvas container adopts the table form.
[0079] Step S1302, obtain the binding rule of the canvas container corresponding to the canvas container type.
[0080] In the embodiments of the present application, the binding rules corresponding to each canvas container are different. After determining the type of each canvas container, the corresponding binding rule can be obtained from the rule library associated with each canvas container type. It can be understood that the canvas container type and the rule library can be bound by mapping. Among them, mapping refers to a relationship between two elements. For example, when the canvas container type is a table, the "table" can be mapped to the "table rule library", so that in the subsequent application process, after determining that the canvas container type is a table, the table rule library stored in the table rule library can be extracted through the mapping corresponding to the table, thereby improving the efficiency of data processing.
[0081] In step S1303, the to-be-displayed information is filled into the canvas container according to the binding rule.
[0082] In the embodiments of the present application, after determining the binding rule, the position to be filled by each to-be-displayed information can be determined through the binding rule, and then the to-be-displayed information is filled into the position. For example, taking a column chart as an example, when the filling position of the value A in the to-be-displayed information is above the first column of the column chart according to the binding rule, the value A is filled above the first column.
[0083] In step S1303 of some embodiments, as shown in Figure 4 The step of filling the to-be-displayed information into the canvas container according to the binding rule can include but is not limited to steps S130311 to S130313:
[0084] In step S130311, the first filling rule and the second filling rule of the canvas container are determined according to the binding rule.
[0085] In the embodiments of the present application, after obtaining the binding rule, all sub-rules in the binding rule are extracted, and the semantic information of each sub-rule is analyzed in turn, and the filling order in the corresponding canvas container is determined according to the semantic information. For example, the table can include a first filling rule and a second filling rule, wherein the first filling rule is used to limit the filling order from top to bottom in the canvas container, and the second filling rule is used to limit the filling order from left to right in the canvas container. Since the tables are arranged together in a regular manner, the data type that can be filled in each position in the table can be determined through the filling rule from top to bottom and the filling rule from left to right.
[0086] In step S130312, the target filling position of the to-be-displayed information in the canvas container is determined according to the first filling rule and the second filling rule.
[0087] In this embodiment, after obtaining the information to be displayed and the fill rule, the position in the canvas container that each piece of information to be displayed can be filled is determined according to the fill rule. It is understood that the fill rule limits the type of information that can be filled at each position. Therefore, by judging the relationship between the information to be displayed and the type of information that can be filled at each position, if they are the same, it is determined that the information to be displayed is to be filled at that position; if they are different, it is determined that it cannot be filled at that position.
[0088] Step S130313: Fill the information to be displayed into the target fill position.
[0089] In this embodiment, once the target position where the information to be displayed can be filled is determined, the information to be displayed is filled into that position. It is understood that the target position can be determined using the coordinate data of each fill position within the canvas container. For example, taking a table as an example, if the coordinate data of the target fill position is (8, 5), it means that the position where the information to be displayed is to be filled is the 8th column horizontally and the 5th column vertically, that is, the intersection of the 8th horizontal column and the 5th vertical column, which is the position where the information to be displayed can be filled.
[0090] Taking an Excel scenario as an example, such as Figure 5 As shown, the preset message table contains worksheets 1, 2, and 3. When worksheet 1 is selected as the current canvas container, the first fill rule for worksheet 1 is defined from top to bottom as East, West, South, and North zones, and the second fill rule is defined from left to right as icon format, title, intrinsic value, year-on-year comparison, achievement, background, background color, and unit. If the information to be displayed is "South Zone business intrinsic value is 94.387 million", then by analyzing the semantic information of the information to be displayed, it can be seen that the information to be displayed includes "South Zone", "94.387 million", and "million". The fill positions of these pieces of information in worksheet 1 are determined according to the first and second fill rules respectively. Analysis shows that "South District" is a title, and according to the first and second fill rules, its fill position coordinates are (2,3), which is the second horizontal column and the third vertical column of the table. "9438.7" is the embedded value, and according to the first and second fill rules, its fill position coordinates are (3,3), which is the third horizontal column and the third vertical column of the table. "Ten Thousand" is a unit, and according to the first and second fill rules, its fill position coordinates are (8,3), which is the eighth horizontal column and the third vertical column of the table.
[0091] In step S1303 of some embodiments, such as Figure 6As shown, the step of filling the information to be displayed into the canvas container according to the binding rule can further include, but is not limited to, steps S130321 to S130323:
[0092] In step S130321, third and fourth filling rules of the canvas container are determined according to the binding rule.
[0093] In the embodiment of the present application, after the binding rule is acquired, all sub-rules in the binding rule are extracted, and then semantic information contained in each sub-rule is analyzed in sequence. The semantic information can be the meaning of the information to be displayed that can be filled in each filling position. For example, the semantic information contained in each sub-rule can include original field semantic information and decoration field semantic information, or include numerical information and character information. Specifically, the embodiment defines the original field filling position in the canvas container by the third filling rule, and defines the decoration field filling position in the canvas container by the fourth filling rule; or, the embodiment defines the numerical filling position in the canvas container by the third filling rule, and defines the character filling position in the canvas container by the fourth filling rule. For specific definition, the embodiment can be adjusted according to actual needs.
[0094] In step S130322, the field type of the information to be displayed is determined.
[0095] In the embodiment of the present application, when the meaning of the sub-rule contained in the binding rule is analyzed, the field type of the information to be displayed can also be determined. For example, the information to be displayed is "the value of the business in the west area is 9438.7 million, with a year-on-year growth of 29.2, and the filling background is selected to be blue". When the third filling rule is used to define the original field filling position in the canvas container, and the fourth filling rule is used to define the decoration field filling position in the canvas container, the analysis of the information to be displayed shows that the field type of the information to be displayed includes the original field type and the decoration field type, wherein the original fields are "the west area", "9438.7", "29.2" and "million", and the decoration fields include "blue". When the third filling rule is used to define the numerical filling position in the canvas container, and the fourth filling rule is used to define the character filling position in the canvas container, the analysis of the information to be displayed shows that the field type of the information to be displayed includes the numerical field type and the character field type, wherein the numerical fields include "438.7" and "29.2", and the character fields include "the west area", "million" and "blue".
[0096] In step S130323, when the field type belongs to the original field type, the information to be displayed is filled into the original field filling position; and when the field type belongs to the decoration field type, the information to be displayed is filled into the decoration field filling position.
[0097] In the embodiment of the present application, after the sub-rules corresponding to the binding rule in the canvas container are analyzed and the field type of the information to be displayed is analyzed, the filling position of the information to be displayed can be determined by judging the sub-rules satisfied by the field type of the information to be displayed. For example, the information to be displayed is "the business value of the north area is 9436.5 million, an increase of 30.1%, and the filling background is red", the third filling rule in the current binding rule is used to limit the numerical filling position in the canvas container, and the fourth filling rule is used to limit the text filling position in the canvas container. Through analysis, it can be known that "north area", "9436.5", "30.1" and "million" in the information to be displayed belong to the original field, and "red" belongs to the decoration field. Therefore, "north area", "9436.5", "30.1" and "million" are sequentially filled into the original field position, and "red" is filled into the decoration field position.
[0098] In step S140, the request information sent by the front end is acquired.
[0099] In the embodiment of the present application, the front end refers to the front part of the front website, which is run on a computer terminal or a mobile terminal browser to display a webpage for users to browse. With the development of Internet technology and the application of front-end framework, cross-platform responsive web design can adapt to various screen resolutions, and dynamic effect design can bring users a very high user experience. When the business request information currently needed to be viewed is input on the front-end interface, the background or server can respond according to the request information and return the response information to the front end. In the embodiment, the request information can include business request information and front-end page identifier, the business request information is used to indicate the background to call data, and the front-end page identifier is used to indicate the return position of the background after calling the response data.
[0100] In step S150, the preset message table corresponding to the request information is determined as the target message table.
[0101] In step S150 of some embodiments, as shown in Figure 7 The step of determining the preset message table corresponding to the request information as the target message table can further include, but is not limited to, steps S1501 to S1504:
[0102] In step S1501, the request information is subjected to word segmentation processing.
[0103] In the embodiments of the present application, the word segmentation refers to a technology of using various matching methods to process the query after the user submits the keyword string. Specifically, the word segmentation processing includes splitting, synonym replacement, and stop word removal, etc. The splitting refers to splitting the request information sent by the front end into several words, so as to facilitate the subsequent analysis of the semantic information of each word. For example, the request information is "query medical data", and the splitting of the request information can obtain three words "query", "medical", and "data". The synonym is to replace a part of the word in the request information sent by the front end with other words similar to it, wherein "similar" refers to close or identical in semantics. For example, the request information is "query medical data", and "query" can be replaced by "find" and "search" and the like. The stop word removal refers to deleting a part of the word in the request information sent by the front end which does not affect the semantic understanding. For example, the request information is "query medical data of multiple communities", and the essential meaning of the request information is "query community medical data", so "multiple" and "of" and the like can be deleted, thereby reducing the data processing amount in the subsequent data query process.
[0104] In step S1502, the brief information of the preset message table is obtained.
[0105] In the embodiments of the present application, in the background or server, each preset message table can pre-store corresponding brief information, which is used to describe the to-be-displayed information that can be filled by the corresponding message table. For example, in a preset message table of an insurance type, the information that can be filled is the information about insurance, such as insurance transaction amount, insurance type, insured object of each type, and insured duration, etc. Therefore, the brief information of the preset message table can be described as "vehicle insurance includes monthly insurance and annual insurance, and the insurance object includes accidental accidents".
[0106] In step S1503, the relevance between the request information after the word segmentation processing and the brief information is calculated.
[0107] In the embodiment of the present application, after the request information processed by word segmentation and the brief information corresponding to the preset message table are acquired, the embodiment calculates the association degree between the request information and the brief information. It can be understood that the association degree can express the association degree by similarity and confidence. The confidence represents the probability of the occurrence of association Y under the condition that the prerequisite condition X of the association rule occurs, i.e. the possibility of containing Y in the item set containing X. The similarity is used to evaluate the degree of similarity between two things. For example, the request information is "query hospital information", the brief information A is "community hospital includes department introduction, doctor introduction and hospital historical background information", and the brief information B is "insurance business includes car insurance, personal insurance, car insurance amount and personal insurance amount". After the request information is processed by word segmentation, the confidence of the request information with the brief information A and the brief information B is calculated. Alternatively, after the request information is processed by word segmentation, the similarity of the request information with the brief information A and the brief information B is calculated. Of course, the embodiment can also select other measurement information capable of expressing the association degree between two information as the association degree.
[0108] Step S1504, determining the target message table from the several preset message tables according to the association degree.
[0109] In the embodiment of the present application, taking the example of step S1503, the request information is "query hospital information", the brief information A is "community hospital includes department introduction, doctor introduction and hospital historical background information", and the brief information B is "insurance business includes car insurance, personal insurance, car insurance amount and personal insurance amount". After the request information is processed by word segmentation, the confidence of the request information with the brief information A is 0.98, and the confidence of the request information with the brief information B is 0.01. By comparing the two confidences, it can be known that the preset message table corresponding to the brief information A should be selected as the target message table. Alternatively, after the request information is processed by word segmentation, the similarity of the request information with the brief information A is 96%, and the similarity of the request information with the brief information B is 2%. By comparing the similarities, it can be known that the preset message table corresponding to the brief information A should be selected as the target message table.
[0110] Step S160, sending the target message table to the front end, so that the front end displays information according to the to-be-displayed information in the target message table.
[0111] In the embodiment of the present application, when the front end sends the request information to the background, the front end can carry the address identifier of the front end through the request information, so that the background can accurately send the target message to the corresponding front end through the address identifier after obtaining the target message table. Specifically, after receiving the target message table, the front end can adjust the display information of the display module according to the information in the canvas container in the target message table. For example, the information displayed by the key indicator display module can be adjusted according to the data in the key indicator canvas container, specifically, the numerical value and background information in the display information can be adjusted; the shape of the columnar graph display module can be adjusted according to the data in the columnar graph canvas container, specifically, the height of each column and the color of each column in the display information of the columnar graph display module can be adjusted.
[0112] Taking a table scene as an example, the target display information of each row of the table can be obtained as the display information to be displayed. Since there is one display subgraph in each display module of each row, after obtaining the target display information of each row, the display content of the corresponding display subgraph is adjusted according to the target display information, so that each display subgraph can display according to the adjusted information, so as to conform to the actual content of the current request information.
[0113] The processing method of the front end data of the embodiment of the present application is described in detail, which includes but is not limited to the following steps:
[0114] Step one, obtaining the business requirement information sent by the first front end. The first front end can be a web interface on a mobile terminal of a business developer. The business requirement information can include one type of request information, or can include multiple types of request information.
[0115] Step two, obtaining the display information to be displayed according to the business requirement information. The display information to be displayed includes display background information to be displayed, display business data to be displayed, and region information corresponding to the display business data to be displayed. The display business data to be displayed is used to adjust the display information of the corresponding display module on the display interface, the display background information is used to limit the background type of the display business data to be displayed on the front end interface, and the region information is used to limit the position of the display business data to be displayed on the front end interface.
[0116] Step three, fill the information to be displayed into the preset message table. The preset message table can be in the form of Excel, or in other table forms. The preset message table can include multiple worksheets, and each worksheet corresponds to a canvas container. When a preset message table corresponds to a linear container, a worksheet corresponds to a canvas container. The content of the linear container is used to adjust all display contents on a display page, including substantive contents and background contents, and the content of the canvas container is used to adjust the display contents of a display module on the display page. Therefore, all adjustment information of a display page can be sorted into a linear container, i.e., into a preset message table, so that when called, a preset message table can be called to complete the adjustment process of a display page. In this embodiment, the binding rule of the information to be displayed in the preset message table can be obtained according to the type of the canvas container, so that the information to be displayed can be accurately filled into the target position in the preset message table according to the binding rule.
[0117] Step four, obtain the request information sent by the second front end. The first front end and the second front end can be the interactive interfaces of the same terminal device, or the interactive interfaces of different terminal devices. For example, the first front end can be the terminal interface of the developer, and the second front end can be the terminal interface of the business personnel. For example, in the test process, the first front end and the second front end can be the terminal interface of the developer; in the development and application process, the first front end is the terminal interface of the developer, and the second front end is the terminal interface of the business personnel.
[0118] Step five, determine the preset message table corresponding to the request information as the target message table. In this embodiment, the request information can be processed by a word segmentation processing mode, and the target message table can be determined according to the relevance of the processed information and the corresponding brief information of the preset message table, so as to effectively improve the accuracy of the target message table.
[0119] Step six, send the target message table to the front end, so that the front end displays information according to the information to be displayed in the target message table.
[0120] As can be seen from the above, the method of the embodiment of the present application obtains the information to be displayed according to the business demand information, determines the binding rule according to the type of the canvas container in the preset message table, and fills the information to be displayed into the preset message table according to the binding rule, so that when the request information is sent by the front end, the preset message table corresponding to the request information can be sent to the front end, and then the front end can adjust the display information of the corresponding display module according to the information to be displayed in the target message table, i.e., the front end can display the content meeting the user's request, so that the developer does not need to pre-transform and bind the data and view data obtained by the request in the front end, and the front end development time is effectively reduced.
[0121] Please refer toFigure 8 The embodiment of the application further provides a front-end data processing device, which can realize the front-end data processing method.
[0122] The first obtaining module is configured to obtain service requirement information.
[0123] The second obtaining module is configured to obtain to-be-displayed information according to the service requirement information, wherein the to-be-displayed information comprises to-be-displayed background information, to-be-displayed service data and region information corresponding to the to-be-displayed service data.
[0124] The filling module is configured to fill the to-be-displayed information into a preset message table.
[0125] The third obtaining module is configured to obtain request information sent by the front end.
[0126] The determining module is configured to determine a preset message table corresponding to the request information as a target message table.
[0127] The sending module is configured to send the target message table to the front end, so that the front end displays information according to to-be-displayed information in the target message table.
[0128] The specific implementation of the front-end data processing device is basically the same as the specific embodiment of the front-end data processing method, and will not be repeated here.
[0129] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is shown, and the electronic device comprises:
[0130] The at least one memory 910 is configured to store programs.
[0131] The at least one processor 920 is configured to load the programs to perform the front-end data processing method shown. Figure 1
[0132] The content of the method embodiment of the application is applicable to the electronic device embodiment, the electronic device embodiment specifically realizes the functions of the above-mentioned method embodiment, and achieves the same beneficial effects as the above-mentioned method, and will not be repeated here.
[0133] In some optional embodiments, the memory can be used to store non-transitory software programs and non-transitory computer executable programs as a kind of non-transitory computer readable storage medium. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include remote memory relative to the processor, which can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0134] The non-transitory software programs and instructions required to implement the above-mentioned front-end data processing method are stored in the memory, and when executed by the processor, the processing method of the user search intention in the above-mentioned embodiments is executed, for example, the method steps S110 to S160 in the above description are executed. Figure 1
[0135] In some optional embodiments, the above-mentioned electronic device can be a computer device, which can be a server and can be a background of software corresponding to a user terminal. The present embodiment takes the computer device as an example of the background of the corresponding software on the user terminal, and the specific implementation is as follows:
[0136] As shown in Figure 10 , the computer device can include RF (Radio Frequency, radio frequency) circuit 1010, memory 1020 including one or more computer readable storage media, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, short distance wireless transmission module 1070, processor 1080 including one or more processing cores, and power supply 1090, etc.
[0137] The RF circuit 1010 can be configured to transmit and receive information, signals, etc. Specifically, after receiving downlink information from a base station, the RF circuit 1010 can process the information, signals, etc. and then transmit the processed information, signals, etc. to the processor 1080. In addition, the RF circuit 1010 can transmit data to the base station. Generally, the RF circuit 1010 can include, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a user identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1010 can communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard, or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), Bluetooth®, Bluetooth® Low Energy, Wi-Fi, Zigbee®, Z-Wave, etc.
[0138] The memory 1020 can be used to store software programs and modules. The processor 1080 can execute various functions, applications, and data processing by running the software programs and modules stored in the memory 1020. The memory 1020 can include a program storage area and a data storage area. The program storage area can store operating systems, application programs (such as a sound recording function, an image viewing function, etc.) required for at least one function, etc. The data storage area can store data (such as audio data, text, etc.) created according to the use of the device, etc. In addition, the memory 1020 can include a high-speed random access memory, and can further include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 1020 can further include a memory controller to provide access to the memory 1020 for the processor 1080 and the input unit 1030.
[0139] The input unit 1030 can be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, the input unit 1030 can include a touch-sensitive surface 1031 and other input devices 1032. The touch-sensitive surface 1031, also known as a touch display screen or touchpad, can collect touch operations of a user thereon or adjacent thereto (such as operations of a user using a finger, a stylus, or any suitable object or accessory on or adjacent to the touch-sensitive surface 1031) and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 1031 can include two parts of a touch detection device and a touch controller. The touch detection device detects the touch position of the user and detects the signal generated by the touch operation and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch coordinates and sends it to the processor 1080, and can also receive commands from the processor 1080 and execute them. In addition, the touch-sensitive surface 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 1031, the input unit 1030 can also include other input devices 1032. Specifically, the other input devices 1032 can include one or more of a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, etc.
[0140] The display unit 1040 can be configured to display information input by a user or information provided to a user and various graphical user interfaces controlled thereby, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 1040 can include a display panel 1041, which can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 1031 can be overlaid on the display panel 1041, and when the touch-sensitive surface 1031 detects a touch operation thereon or adjacent thereto, transmits it to the processor 1080 to determine the type of touch event, and then the processor 1080 provides corresponding visual output on the display panel 1041 according to the type of touch event.
[0141] The embodiments of the present application also provide a storage medium, which is a computer-readable storage medium, and stores a computer program. The computer program is executed by a processor to implement the front-end data processing method shown in the embodiments. Figure 1
[0142] The method and device for processing front-end data, the electronic device and the storage medium provided by the embodiments of the present application can obtain to-be-displayed information according to service requirement information, determine a binding rule according to a canvas container type in a preset message table, and then fill the to-be-displayed information into the preset message table according to the binding rule, so that the preset message table corresponding to the request information can be sent to the front end when the request information is sent by the front end, and then the front end can adjust the display information of the corresponding display module according to the to-be-displayed information in the target message table, that is, the front end can display the content meeting the user request. Therefore, the embodiments of the present application do not require the developer to pre-convert and bind the data requested and the view data in the front end, and effectively reduce the front-end development time.
[0143] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0144] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures, or combine certain steps or different steps.
[0145] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0146] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0147] The terms "first", "second", "third", "fourth" and the like (if any) in the specification of the present application and the above-described figures are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0148] It should be understood that, in the application, "at least one" means one or more, "multiple" means two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including single or multiple combinations of items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0149] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0150] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment.
[0151] In addition, each functional unit in each embodiment of the application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0152] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0153] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method of processing front-end data, characterized by, The method comprises: obtaining business requirement information; obtaining to-be-displayed information according to the business requirement information, the to-be-displayed information comprising to-be-displayed background information, to-be-displayed business data and region information corresponding to the to-be-displayed business data; filling the to-be-displayed information into a preset message table; obtaining request information sent by a front end; determining a preset message table corresponding to the request information as a target message table; sending the target message table to the front end so that the front end displays information according to the to-be-displayed information in the target message table; the filling of the to-be-displayed information into the preset message table comprises: judging a canvas container type in the preset message table; obtaining a binding rule of a canvas container corresponding to the canvas container type; filling the to-be-displayed information into the canvas container according to the binding rule; the filling of the to-be-displayed information into the canvas container according to the binding rule comprises: determining a third filling rule and a fourth filling rule of the canvas container according to the binding rule, the third filling rule being used to define a position of an original field in the canvas container, and the fourth filling rule being used to define a position of a decoration field in the canvas container; judging a field type of the to-be-displayed information; when the field type belongs to an original field type, filling the to-be-displayed information into the position of the original field; when the field type belongs to a decoration field type, filling the to-be-displayed information into the position of the decoration field.
2. The treatment method according to claim 1, characterized in that, the judging of the canvas container type in the preset message table comprises: determining a number of canvas containers in the preset message table, the number of canvas containers comprising at least one; judging a canvas container type corresponding to each canvas container, the canvas container type comprising a table and an image, and the image comprising a column chart and a pie chart.
3. The treatment method of claim 1, wherein the filling of the to-be-displayed information into the canvas container according to the binding rule comprises: determining a first filling rule and a second filling rule of the canvas container according to the binding rule, the first filling rule being used to define a filling sequence from top to bottom in the canvas container, and the second filling rule being used to define a filling sequence from left to right in the canvas container; determining a target filling position of the to-be-displayed information in the canvas container according to the first filling rule and the second filling rule; filling the to-be-displayed information into the target filling position.
4. The treatment method of claim 1, wherein the determination of the preset message table corresponding to the request information as the target message table comprises: performing word segmentation processing on the request information, the word segmentation processing comprising synonym replacement or stop word removal; obtaining brief information of the preset message table; calculating a correlation degree between the request information after the word segmentation processing and the brief information; determining the target message table from a plurality of preset message tables according to the correlation degree.
5. The treatment method of claim 2, wherein when the canvas container type is a table, the displaying of information according to the to-be-displayed information in the target message table comprises: obtaining to-be-displayed information of each row of the table as target display information; adjusting display content of a corresponding display module according to the target display information; According to the adjusted display content, information is displayed.
6. A device for processing front-end data, characterized by The device comprises: A first obtaining module is configured to obtain service requirement information. A second obtaining module is configured to obtain to-be-displayed information according to the service requirement information, the to-be-displayed information including to-be-displayed background information, to-be-displayed service data, and region information corresponding to the to-be-displayed service data. A filling module is configured to fill the to-be-displayed information into a preset message table. A third obtaining module is configured to obtain request information sent by a front end. A determining module is configured to determine a preset message table corresponding to the request information as a target message table. A sending module is configured to send the target message table to the front end, so that the front end displays information according to to-be-displayed information in the target message table. The filling of the to-be-displayed information into the preset message table comprises: Judging a canvas container type in the preset message table. Obtaining a binding rule of a canvas container corresponding to the canvas container type. Filling the to-be-displayed information into the canvas container according to the binding rule. The filling of the to-be-displayed information into the canvas container according to the binding rule comprises: Determining a third filling rule and a fourth filling rule of the canvas container according to the binding rule, the third filling rule being used to define an original field filling position in the canvas container, and the fourth filling rule being used to define a decoration field filling position in the canvas container. Judging a field type of the to-be-displayed information. When the field type belongs to an original field type, filling the to-be-displayed information into the original field filling position. When the field type belongs to a decoration field type, filling the to-be-displayed information into the decoration field filling position.
7. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the front-end data processing method of any one of claims 1 to 5 when executing the computer program.
8. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the front-end data processing method of any one of claims 1 to 5.
Citation Information
Patent Citations
Report data query method and device, storage medium and electronic device
CN110688541A
Business query method and device
CN114218253A