CN110597897A - Data calling method, device, medium and electronic equipment - Google Patents

Data calling method, device, medium and electronic equipment Download PDF

Info

Publication number
CN110597897A
CN110597897A CN201910863009.8A CN201910863009A CN110597897A CN 110597897 A CN110597897 A CN 110597897A CN 201910863009 A CN201910863009 A CN 201910863009A CN 110597897 A CN110597897 A CN 110597897A
Authority
CN
China
Prior art keywords
data
information
calling
applicant
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910863009.8A
Other languages
Chinese (zh)
Inventor
张学红
蒋宏寅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201910863009.8A priority Critical patent/CN110597897A/en
Publication of CN110597897A publication Critical patent/CN110597897A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Abstract

The embodiment of the disclosure relates to the technical field of information, and provides a data calling method, a device, a medium and electronic equipment, wherein the data calling method comprises the following steps: obtaining form data, wherein the form data comprises a plurality of data items; processing the form data by using a constructor according to a data model to obtain constructed data, and segmenting the constructed data according to insurance policy basic information, insurance applicant information, insured person information, insurance policy detail information and claim settlement information; and returning the construction data corresponding to the calling request by responding to the calling request. The calling party does not need to be embedded into the page of the server, the server serves as a provider of a data source, and the calling party acquires data from the server through the calling server interface instead of acquiring the data in a mode of being embedded into the service page, so that the problem of browser compatibility caused by a webpage embedding mode can be solved, the development difficulty of the calling interface can be reduced, the coupling performance can be reduced, and the trust range can be narrowed.

Description

Data calling method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a data calling method, apparatus, medium, and electronic device.
Background
With the development of information data technology, data transmission between application systems is often required, and in the data interaction process of a multi-application system, a situation that a certain application system acquires data from another application system may be involved, and generally, such data interaction is realized by means of interface call.
When the interface calls to realize data interaction, the premise is that the sending and receiving parties need to agree on a path, a format, a processing mode and the like, namely, the development can be started after the message format of the data is confirmed. However, for some application systems, the data types are more, a server side needs to provide a variety of interfaces and updates frequently, which brings great difficulty to the cooperation between the server side and a caller side, so that the development of the traditional interface calling mode is difficult to keep up with the development speed of the service, and the problem of difficult development of the calling interface is caused.
Therefore, there is still a need for improvement in the prior art by embedding page call data.
It is to be noted that the information disclosed in the above background art is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a data calling method, apparatus, medium, and electronic device, so as to overcome, at least to a certain extent, a disadvantage that an existing calling interface is difficult to develop.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or may be learned by practice of the disclosure.
According to a first aspect of the embodiments of the present disclosure, there is provided a data calling method, including:
obtaining form data, wherein the form data comprises a plurality of data items;
processing the form data by using a constructor according to a data model to obtain constructed data, and segmenting the constructed data according to insurance policy basic information, insurance applicant information, insured person information, insurance policy detail information and claim settlement information;
returning construction data corresponding to the call request by responding to the call request;
wherein processing the form data according to the data model using the constructor comprises:
calling the constructor by a new key;
creating a subclass object through the constructor, and allocating a memory space for the subclass object;
and processing the form data according to the data model, and storing the form data into a corresponding memory space to obtain the construction data.
In one exemplary embodiment of the present disclosure, the plurality of data items includes a combination of at least two of the name of the applicant, the sex of the applicant, the number of the applicant's certificate, the amount of the application, the name of the insured person, the relationship of the insured person to the applicant.
In an exemplary embodiment of the present disclosure, the data model includes a two-dimensional table, a data structure of the two-dimensional table is Array, a data structure of each group of key-value pairs in the set of key-value pairs is Map, and the Map is divided into two types, i.e., a horizontal display key-value pair and a vertical display key-value pair.
In an exemplary embodiment of the present disclosure, the key of the Map is a natural number which is consecutive from 1, the value of the Map is a structure composed of two key-value pairs, the two key-value pairs are desc and value, wherein the desc is text for showing description information of data, and the value is another Map or Array or text.
In an exemplary embodiment of the present disclosure, the two-dimensional table and the key-value pairs are in a nested form.
In an exemplary embodiment of the disclosure, the information obtained after segmenting the construction data according to applicant information includes: name of the applicant, sex of the applicant, identity number of the applicant and contact information of the applicant.
In an exemplary embodiment of the present disclosure, further comprising:
if the call request has an order requirement for the plurality of data items within each section or an order requirement for the section, returning the construction data according to the order requirement.
According to a second aspect of the embodiments of the present disclosure, there is provided a data calling apparatus, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring form data which comprises a plurality of data items;
the construction module is used for processing the form data by using a constructor according to a data model to obtain construction data, and segmenting the construction data according to insurance policy basic information, policyholder information, insured person information, insurance policy detail information and claim settlement information; wherein processing the form data according to the data model using the constructor comprises:
calling the constructor by a new key;
creating a subclass object through the constructor, and allocating a memory space for the subclass object;
processing the form data according to the data model, and storing the form data into a corresponding memory space to obtain the construction data;
and the return module is used for returning the construction data corresponding to the call request by responding to the call request.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the steps of the data call method described above.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data call method described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the technical solutions provided by some embodiments of the present disclosure, on one hand, the caller does not need to be embedded into the page of the server, the server serves as a provider of the data source, and the caller acquires data from the server by calling the server interface, instead of acquiring data by embedding into the service page, so that the problem of browser compatibility caused by the webpage embedding manner can be solved. On the other hand, the development difficulty of the calling interface is reduced, the coupling is reduced, and the trust range can be reduced. In addition, by displaying the constructed data in sections, data management and query are facilitated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
fig. 1 is a system scenario block diagram illustrating a data call method and apparatus according to an example embodiment.
Fig. 2 is a schematic flowchart of a data calling method according to an embodiment of the present disclosure.
FIG. 3 is a schematic diagram showing hybrid data at a front end according to an embodiment of the present disclosure.
FIG. 4 is a flow diagram for implementing caller and server data calls using a data model according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram illustrating a data call apparatus according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram illustrating a computer system of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be merged or data subsegmented, so that the actual execution order may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
In the related embodiment of the present disclosure, taking an insurance service center project as an example, the way for acquiring the insurance policy details with other application systems (such as insurance) is as follows: there is a link in the insurance service center page, and then the browser directly opens the insurance policy details page of the insurance through the link. When the insurance service center and some application systems represented by property insurance interactively acquire data, the detailed contents of the property insurance policy are displayed differently according to different targets, and the targets are various (thousands of targets), and are updated frequently (new products are generated almost every month). The way of directly embedding in the server page at the insurance service center has the following problems:
1) safety problems are as follows: the embedded page is only linked through browser skipping, the mode cannot verify the user, the trust can only be based on the trust of an intranet, the trust range is larger, and the risk of trust is larger;
2) browser compatibility issues: because different projects are developed aiming at different browsers, the page can be compatible with different browsers by embedding the page, and the development difficulty is increased;
3) the problem of coupling: the data displayed by the calling party is limited by the service party in a page embedding mode, the calling party cannot further process the data, and the flexibility is poor;
4) the development of the traditional interface calling is difficult.
Therefore, the present disclosure provides a data calling method, device, medium, and electronic device, and the following specifically introduces the technical solution of the present disclosure.
Fig. 1 is a system scenario block diagram illustrating a data call method and apparatus according to an example embodiment.
As shown in fig. 1, the system architecture 100 may include caller's terminal devices 101, 102, 103, a network 104, and a server 105 of a server. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 interact with a server 105 via a network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like. Taking the insurance industry as an example, the caller can be other types of insurance such as financial insurance, and the server can be an insurance service center.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for service requests made with the terminal devices 101, 102, 103. The server 105 may analyze and perform other processing on the received service request and the related data, and feed back a processing result to the terminal device, that is, the caller calls the data from the server.
The calling request can be generated through the terminal devices 101, 102 and 103, the terminal devices 101, 102 and 103 can generate the calling request according to the service requirement and send the calling request to the server 105, the server 105 can obtain form data, and the form data comprises a plurality of data items; server 105 may build a build pricing model, for example, from the intermediate tables; server 105 may process the form data according to a data model, for example, using a constructor, resulting in constructed data; and the server 105 may retrieve the data satisfying the business requirement, for example, by returning the configuration data corresponding to the invocation request in response to the invocation request.
The server 105 may also return the service request processing result, i.e. the generated configuration data, to the terminal devices 101, 102, 103, for example, and the terminal devices 101, 102, 103 may further process the service request processing result, for example.
It should be noted that the data calling method provided by the embodiment of the present disclosure may be executed by the server 105, and accordingly, the data calling apparatus may be disposed in the server 105.
Fig. 2 is a schematic flowchart of a data calling method according to an embodiment of the present disclosure, and referring to fig. 2, the data calling method includes:
step S210, obtaining form data, where the form data includes a plurality of data items.
And S220, processing the form data according to the data model by using a constructor to obtain constructed data, and segmenting the constructed data according to insurance policy basic information, insurance applicant information, insured person information, insurance policy detail information and claim settlement information. Wherein the processing the form data according to the data model with the constructor comprises: calling the constructor by a new key; creating a subclass object through the constructor, and allocating a memory space for the subclass object; processing the form data according to the data model and storing the form data into a corresponding memory space
Step S230, returning the configuration data corresponding to the call request by responding to the call request.
In the technical solution provided in the embodiment shown in fig. 2, on one hand, the caller does not need to be embedded into the page of the server, the server serves as a provider of the data source, and the caller acquires data from the server by calling the server interface, instead of acquiring data by embedding into the service page, so that the problem of browser compatibility caused by the webpage embedding manner can be solved. On the other hand, the development difficulty of the calling interface is reduced, the coupling is reduced, and the trust range can be reduced. In addition, by displaying the constructed data in sections, data management and query are facilitated.
The specific implementation of each step of the embodiment shown in fig. 2 is explained in detail below:
in step S210, form data is acquired, and the form data includes a plurality of data items.
In an exemplary embodiment of the present disclosure, due to the development of business requirements and the variety of data items, a service side needs to generate various form data at a faster speed according to the business development, the form data contains the same or different data items, and it is not known what the data message needs to be transmitted in the encoding stage.
In one exemplary embodiment of the present disclosure, the plurality of data items in the form data include a combination of at least two of the name of the applicant, the sex of the applicant, the number of the applicant's certificate, the amount of the application, the name of the insured person, the relationship of the insured person to the applicant. Since the data description of the key-value pairs and the headers of the tables need to be provided from the server, the order of each presentation of the data items must be identical for a certain type of form data.
In step S220, the form data is processed by the constructor according to the data model to obtain the constructed data, and the constructed data is segmented according to the insurance policy basic information, the applicant information, the insured person information, the insurance policy detail information and the claim settlement information.
In an exemplary embodiment of the present disclosure, in this step, the constructor is used to obtain the construction data, specifically: firstly, calling the constructor through a new keyword; secondly, creating a subclass object through the constructor, and allocating a memory space for the subclass object; and finally, processing the form data according to the data model, and storing the form data into a corresponding memory space to obtain the construction data.
Where constructors are an important way to create Java objects, they can be called by new keys and can return objects of that class, but the returned objects of that class are not fully responsible for creation by the constructors. When the constructor is called, the system allocates memory space for the object and performs default initialization for the object, and if the object is generated, the default initialization is completed before the constructor is specified. When the system starts between executors of the constructor, an object is already created in the system, but the object is not enough to be accessed by an external program and can only be referred to in the constructor through this. When the execution of the constructor's executive is finished, this object is returned as the constructor's return value, which is assigned to another variable of the reference type, thereby making the external program accessible.
In an exemplary embodiment of the present disclosure, after the configuration data is obtained, the configuration data is further segmented according to policy base information, applicant information, insured person information, policy detail information, and claims information. There may be more data items within each section, for example, the applicant information may have: name of the applicant, sex of the applicant, identity number of the applicant, contact details of the applicant, etc.
In an exemplary embodiment of the present disclosure, since the front-end acquired data of the caller is only used as a presentation, there is no need to configure the interface similarly: and input elements such as a drop-down box, a radio box, a flotation box, a text input box and the like, and in addition, a background specified format is not required when the front end of the calling party is displayed. The caller for different insurance products may require different display orders for different fields, and the caller requires that the display contents be arranged in the required order.
In an exemplary embodiment of the present disclosure, the data model includes a two-dimensional table, a set of key-value pairs, and plain text, wherein the two-dimensional table and the key-value pairs may be in a nested form to meet a variety of display requirements.
In an exemplary embodiment of the present disclosure, in the above data model, the data types other than plain text, the two-dimensional table and the key-value pair set are structured, i.e., the data needs to be represented by a structured representation means, such as XML or JSON. First, there must be a "type" node on the root node of the data structure to indicate which way the current data structure needs to be parsed, and the values of the type node can be V _ Map, H _ Map and Array, where V (vertical) refers to displaying the key-value pair in a vertical (i.e. up and down) way, and H (horizontal) refers to displaying the key-value pair in a horizontal way. Secondly, there may be a "desc" node on the root node, and the value of the desc node is a string used to describe a piece of text of the data.
The Map is a group of key value pairs, the data of the Map is constructed in a key value pair mode, keys in the key value pairs are continuous natural numbers starting from 1 and represent the positions of the data displayed in the whole Map, and the 1 is the most front, and the larger number is the more rear. The number as a key must be continuous and if there is a discontinuity, the following data will be discarded from the end point.
The values in a key-value pair are structures consisting of two key-value pairs: desc is a piece of text used to show description information of data, such as: "name", "gender", "notes", "status" and the like. value can be another Map, either an Array or a piece of text.
Map is actually a tree structure, so it is often the root of data.
Several examples of maps constructed by Json are presented below:
1) the H-Map mainly comprises three parts of type, desc and value.
type: the type, the value at this time is H-Map, indicating that the section is a horizontally presented key-value table style.
desc: the description is the key value for a set of data in the horizontal table.
Value part: the format of the part is most complex and consists of data with a number of keys in the form of a number and a value in the format of Json. Wherein the number keys identify the sequence, and the value part of Json consists of value and desc.
2) The V-Map is mainly composed of type, desc and value parts.
type: the type, the value at this time is V-Map, indicating that the section is a vertically-exposed key-value table style.
desc: the description is the key value of a set of data of a vertical table.
Value part: the format of the part is most complex and consists of data in json format with a number of keys being a number. Wherein the number keys identify the sequence, and the value part of Json consists of value and desc.
3) Array represents a table. Of Array
In addition to the two nodes type and desc, there is a head node at the root of Array and several nodes containing numerical order.
type: type, the value at this time is Array.
desc: desc is a piece of text used to show description information of data, such as: basic information, and the like.
head: the value corresponding to the key of the head is formed by the key value pair of which the key is a number and the value is a text. The numeric key is a natural number starting from 1, and indicates that the value corresponding to the key is the title of the row, with 1 being the first and the larger the number being the next. The number as a key must be continuous and if there is a discontinuity, the following data will be discarded from the end point.
Digital node: the numbers of the digital nodes are natural numbers starting from 1, the identification data is the number-th record in the table, the 1 is the most front, and the larger number is the more rear. The number as key must be continuous, if there is a discontinuity, the following data will be discarded from the end point; the value of the number nodes is also composed of key-value pairs with keys as numbers, and the value can be another Map, or an Array or a piece of text. The numeric keys indicate that the values corresponding to the keys are located in the second column and correspond to the titles in the second column. So the number of digits is the same as in the head, and if different, the presentation will not be resolved.
The following is an example of an Array constructed with Json:
and (3) Array: the method mainly comprises four parts of type, desc, head and value.
Type 1: the type, the value at this time is Array, and indicates that the part of data is a table style including a plurality of headers.
2, desc: description, the overall description information of the Table is represented.
Head: the header, the value in head, is a json' data, where the number in the data identifies the location of the header, i.e., the header is in the column.
4. Value part: the format of the part is most complex and consists of data in json format with a number of keys being a number. The outer numbers identify the data sequence and represent the data of the second item; the inner number corresponds to the number of the head, i.e. to the header and value correspondence, i.e. the value is in the column.
The data model can also comprise the data formats to construct more complex mixed data besides the data format separately.
In step S230, the construction data corresponding to the call request is returned by responding to the call request.
In an exemplary embodiment of the present disclosure, it is further required to determine that all the invocation requests contain a sequence requirement, and if the invocation request has a sequence requirement on the plurality of data items in each section or has a sequence requirement on the section, returning the configuration data according to the sequence requirement.
Fig. 3 is a schematic diagram illustrating mixed data at a front end according to an embodiment of the present disclosure, as shown in fig. 3, including three parts, a first part being in a plain text form, a second part being in a Map form, specifically, a V-Map, and a third part being in an Array form.
The code portions implementing the example shown in FIG. 3 are:
based on the codes, the first part corresponds to 002-005 lines of codes, and shows that the fields displayed by text display are as follows: name-zhang san. The second part corresponds to the 006 ~ 017 line codes, and shows that the fields shown in the form of V-Map are: basic information, including name and gender, name-Zhang III, gender-Man, and the fields of the two items of basic information are shown in a vertical (V) form. The third part corresponds to 018-063 lines of code, showing that the Array format shows the fields as: the policy details, which include fields for the policy number, the applicant, the insured life and the amount of the application, show the cases where the policy number is 0002, 0003 and 0001, respectively. It should be noted that for the case of policy number 0003, the third section shows a form of nested table, since the insured life is two (greater than 1), and further shows the presentation of the three fields of relationship to the applicant, name of the insured life and identification number.
Based on the above, fig. 4 is a flowchart for implementing data calling of the caller and the server by using a data model according to an embodiment of the present disclosure, as shown in fig. 4, including the following steps:
step S401, the server interface receives a calling request sent by a caller.
In step S402, the server acquires form data and constructs the data using the constructor.
In step S403, the server returns the configuration data to the caller.
In step S404, the caller parses the returned configuration data using the parser and displays the nested table.
According to the steps S401 to S404, after the caller obtains the configuration data through calling, the caller controls the code to perform corresponding display, so that the safety problem, the browser compatibility problem and the coupling problem caused by the page embedding mode can be solved, and the steps are specifically as follows: the interface calling mode enables the trust range to be narrowed to be between two services, the trust risk is very small, a calling party calls a service party interface to take data, information can be displayed according to the needs of the calling party, the calling party can develop a browser adaptive to the self, the calling party obtains the data according to the needs of the calling party, the data is processed and displayed, the data of the service party is only used as a data source, and the coupling is reduced.
In summary, with the data invoking method provided by the embodiment of the present disclosure, on one hand, the caller does not need to be embedded into the page of the server, the server serves as a provider of the data source, and the caller acquires data from the server by invoking the server interface, instead of acquiring data by embedding into the service page, so that the problem of browser compatibility caused by the webpage embedding manner can be solved. On the other hand, the development difficulty of the calling interface is reduced, the coupling is reduced, and the trust range can be reduced. In addition, by displaying the constructed data in sections, data management and query are facilitated.
Corresponding to the above data calling method, fig. 5 is a schematic diagram of a data calling apparatus according to an embodiment of the present disclosure, and referring to fig. 5, the data calling apparatus 500 includes: an acquisition module 510, a construction module 520, and a return module 530.
The obtaining module 510 is configured to obtain form data, where the form data includes a plurality of data items; the construction module 520 is configured to process the form data according to the data model by using a constructor to obtain construction data, and section the construction data according to insurance policy basic information, applicant information, insured person information, insurance policy detail information, and claim settlement information, where the processing of the form data according to the data model by using the constructor includes: calling the constructor by a new key; creating a subclass object through the constructor, and allocating a memory space for the subclass object; processing the form data according to the data model and storing the form data in a corresponding memory space; the return module 530 is used to return the construction data corresponding to the call request by responding to the call request.
In an exemplary embodiment of the present disclosure, the plurality of data items in the form data obtained in the obtaining module 510 includes a combination of at least two of the applicant's name, applicant's gender, applicant's license number, amount of the application, name of the insured person, relationship of the insured person to the applicant. Since the data description of the key-value pairs and the headers of the tables need to be provided from the server, the order of each presentation of the data items must be identical for a certain type of form data.
In an exemplary embodiment of the present disclosure, the construction data is obtained in the construction module 520 using a constructor. Where constructors are an important way to create Java objects, they can be called by new keys and can return objects of that class, but the returned objects of that class are not fully responsible for creation by the constructors. When the constructor is called, the system allocates memory space for the object, does not execute default initialization for the object, and if the object is generated, the default initialization is completed before the constructor is specified. When the system starts between executors of the constructor, an object is already created in the system, but the object is not enough to be accessed by an external program and can only be referred to in the constructor through this. When the execution of the constructor's executive is finished, this object is returned as the constructor's return value, which is assigned to another variable of the reference type, thereby making the external program accessible.
In an exemplary embodiment of the present disclosure, the construction module 520 obtains construction data values that are further segmented according to policy base information, applicant information, insured person information, policy details information, and claims information. There may be more data items within each section, for example, the applicant information may have: name of the applicant, sex of the applicant, identity number of the applicant, contact details of the applicant, etc.
In an exemplary embodiment of the present disclosure, since the front-end acquired data of the caller is only used as a presentation, there is no need to configure the interface similarly: and input elements such as a drop-down box, a radio box, a flotation box, a text input box and the like, and in addition, a background specified format is not required when the front end of the calling party is displayed. The caller for different insurance products may require different display orders for different fields, and the caller requires that the display contents be arranged in the required order.
In an exemplary embodiment of the present disclosure, the data model utilized in the construction module 520 includes a two-dimensional table, a set of key-value pairs, and plain text, wherein the two-dimensional table and the key-value pairs may be in a nested form to meet a variety of display requirements.
In an exemplary embodiment of the present disclosure, in the above data model, the data types other than plain text, the two-dimensional table and the key-value pair set are structured, i.e., the data needs to be represented by a structured representation means, such as XML or JSON. First, there must be a "type" node on the root node of the data structure to indicate which way the current data structure needs to be parsed, and the values of the type node can be V _ Map, H _ Map and Array, where V (vertical) refers to displaying the key-value pair in a vertical (i.e. up and down) way, and H (horizontal) refers to displaying the key-value pair in a horizontal way. Secondly, there may be a "desc" node on the root node, and the value of the desc node is a string used to describe a piece of text of the data. The composition and form of Array and Map are referred to the above examples, and are not described herein.
In an exemplary embodiment of the disclosure, the returning module 530 determines that the invocation requests all contain order requirements, and returns the configuration data according to the order requirements if the invocation requests have order requirements for the plurality of data items within each section or have order requirements for the section.
Since each functional module of the data calling device in the exemplary embodiment of the present disclosure corresponds to the step of the exemplary embodiment of the data calling method shown in fig. 2, for details that are not disclosed in the embodiment of the data calling device in the present disclosure, please refer to the embodiment of the data calling method described above in the present disclosure.
Based on the above, through the data calling device composed of the obtaining module 510, the constructing module 520, and the returning module 530, after the caller obtains the constructed data through calling, the caller performs corresponding display through the code control, so as to solve the security problem, the browser compatibility problem, and the coupling problem caused by the page embedding manner, specifically: the interface calling mode enables the trust range to be narrowed to be between two services, the trust risk is very small, a calling party calls a service party interface to take data, information can be displayed according to the needs of the calling party, the calling party can develop a browser adaptive to the self, the calling party obtains the data according to the needs of the calling party, the data is processed and displayed, the data of the service party is only used as a data source, and the coupling is reduced.
In summary, with the data invoking device provided in the embodiments of the present disclosure, on one hand, the caller does not need to be embedded into the page of the server, the server serves as a provider of the data source, and the caller acquires data from the server by invoking the server interface, instead of acquiring data by embedding into the service page, so that the problem of browser compatibility caused by the webpage embedding manner can be solved. On the other hand, the development difficulty of the calling interface is reduced, the coupling is reduced, and the trust range can be reduced.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use with the electronic device implementing an embodiment of the present invention. The computer system 600 of the electronic device shown in fig. 6 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for system operation are also stored. The CPU601, ROM 602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the method for block chain-based medical data management as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 2: step S210, obtaining form data, wherein the form data comprises a plurality of data items; step S220, processing the form data according to a data model by using a constructor to obtain constructed data, and segmenting the constructed data according to insurance policy basic information, policyholder information, insured person information, insurance policy detail information and claim settlement information, wherein the processing of the form data according to the data model by using the constructor comprises: calling the constructor by a new key; creating a subclass object through the constructor, and allocating a memory space for the subclass object; processing the form data according to the data model and storing the form data in a corresponding memory space; step S230, returning the configuration data corresponding to the call request by responding to the call request.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A data calling method, comprising:
obtaining form data, wherein the form data comprises a plurality of data items;
processing the form data by using a constructor according to a data model to obtain constructed data, and segmenting the constructed data according to insurance policy basic information, insurance applicant information, insured person information, insurance policy detail information and claim settlement information;
returning construction data corresponding to the call request by responding to the call request;
wherein processing the form data according to the data model using the constructor comprises:
calling the constructor by a new key;
creating a subclass object through the constructor, and allocating a memory space for the subclass object;
and processing the form data according to the data model, and storing the form data into a corresponding memory space to obtain the construction data.
2. The data call method as recited in claim 1 wherein the plurality of data items comprise a combination of at least two of the name of the applicant, the sex of the applicant, the number of the applicant's certificate, the amount of the application, the name of the insured person, and the relationship of the insured person to the applicant.
3. The data calling method according to claim 1, wherein the data model comprises a two-dimensional table, a data structure of the two-dimensional table is Array, a data structure of each group of key-value pairs in the set of key-value pairs is Map, and the Map is divided into two types, namely a horizontally-displayed key-value pair and a vertically-displayed key-value pair.
4. The data calling method according to claim 3, wherein the key of the Map is a natural number continuing from 1, the value of the Map is a structure consisting of two key-value pairs, the two key-value pairs are desc and value, the desc is text for showing description information of data, and the value is another Map or Array or text.
5. The data call method of claim 3, wherein the two-dimensional table and the key-value pairs are in a nested form.
6. The data call method according to claim 1, wherein the information obtained after segmenting the construction data according to applicant information comprises: name of the applicant, sex of the applicant, identity number of the applicant and contact information of the applicant.
7. The data call method according to claim 1, further comprising:
if the call request has an order requirement for the plurality of data items within each section or an order requirement for the section, returning the construction data according to the order requirement.
8. A data call apparatus, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring form data which comprises a plurality of data items;
the construction module is used for processing the form data by using a constructor according to a data model to obtain construction data, and segmenting the construction data according to insurance policy basic information, policyholder information, insured person information, insurance policy detail information and claim settlement information; wherein processing the form data according to the data model using the constructor comprises:
calling the constructor by a new key;
creating a subclass object through the constructor, and allocating a memory space for the subclass object;
processing the form data according to the data model, and storing the form data into a corresponding memory space to obtain the construction data;
and the return module is used for returning the construction data corresponding to the call request by responding to the call request.
9. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the data call method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a data call method as claimed in any one of claims 1 to 7.
CN201910863009.8A 2019-09-12 2019-09-12 Data calling method, device, medium and electronic equipment Pending CN110597897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910863009.8A CN110597897A (en) 2019-09-12 2019-09-12 Data calling method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910863009.8A CN110597897A (en) 2019-09-12 2019-09-12 Data calling method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN110597897A true CN110597897A (en) 2019-12-20

Family

ID=68859126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910863009.8A Pending CN110597897A (en) 2019-09-12 2019-09-12 Data calling method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110597897A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021786A (en) * 2007-03-15 2007-08-22 浪潮集团山东通用软件有限公司 Method for calling universal structure
US20090119650A1 (en) * 2004-09-09 2009-05-07 International Business Machines Corporation Generating sequence diagrams using call trees
CN105653644A (en) * 2015-12-28 2016-06-08 北京中电普华信息技术有限公司 Page constructor and page construction method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090119650A1 (en) * 2004-09-09 2009-05-07 International Business Machines Corporation Generating sequence diagrams using call trees
CN101021786A (en) * 2007-03-15 2007-08-22 浪潮集团山东通用软件有限公司 Method for calling universal structure
CN105653644A (en) * 2015-12-28 2016-06-08 北京中电普华信息技术有限公司 Page constructor and page construction method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HERBERT SCHILDT: "4.5构造器", 《JAVA2编程起步》 *
程继洪等: "8.8Map对象和Set对象", 《AJAX实用技术》 *

Similar Documents

Publication Publication Date Title
CN108897874B (en) Method and apparatus for processing data
US8954488B2 (en) Extensibility for web based diagram visualization
CN110706093A (en) Accounting processing method and device
CN113031946A (en) Method and device for rendering page component
CN113467775A (en) Method and device for generating page
CN113626223A (en) Interface calling method and device
CN111881329A (en) Account balance management method and system
CN108959642A (en) Method and apparatus for information to be written
CN110109983B (en) Method and device for operating Redis database
CN110795135A (en) Method and device for realizing injection-resolution configuration
CN111258988A (en) Asset management method, device, electronic device, and medium
CN111831179B (en) Signing method, device and computer readable medium
CN110597897A (en) Data calling method, device, medium and electronic equipment
CN115408009A (en) Code file generation method, device, equipment and storage medium
CN110807095A (en) Article matching method and device
CN111552715B (en) User query method and device
CN113761415A (en) Page display method and device
CN112507017A (en) Data table conversion method and device
CN113326680A (en) Method and device for generating table
CN113434754A (en) Method and device for determining recommended API (application program interface) service, electronic equipment and storage medium
CN112825107B (en) Method and device for generating chart
CN111338621B (en) Method, apparatus, electronic device and computer readable medium for displaying data
CN115687738A (en) Multi-dimensional display carrier display method and device, terminal equipment and computer medium
CN113282688A (en) Method, device, equipment and computer readable medium for displaying data
CN115390841A (en) Component expansion method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220

RJ01 Rejection of invention patent application after publication