CN116244365A - Method and device for data aggregation, electronic equipment and storage medium - Google Patents

Method and device for data aggregation, electronic equipment and storage medium Download PDF

Info

Publication number
CN116244365A
CN116244365A CN202310173733.4A CN202310173733A CN116244365A CN 116244365 A CN116244365 A CN 116244365A CN 202310173733 A CN202310173733 A CN 202310173733A CN 116244365 A CN116244365 A CN 116244365A
Authority
CN
China
Prior art keywords
fields
field
dependent
target
queried
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
CN202310173733.4A
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.)
Beijing Volcano Engine Technology Co Ltd
Original Assignee
Beijing Volcano Engine Technology 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 Beijing Volcano Engine Technology Co Ltd filed Critical Beijing Volcano Engine Technology Co Ltd
Priority to CN202310173733.4A priority Critical patent/CN116244365A/en
Publication of CN116244365A publication Critical patent/CN116244365A/en
Pending legal-status Critical Current

Links

Images

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/25Integrating or interfacing systems involving database management systems
    • 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/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a method and apparatus for data aggregation, an electronic device, and a storage medium, where the method includes: acquiring a query target statement; acquiring a plurality of dependent fields associated with fields to be queried corresponding to a query target statement according to the query target statement and a dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and the dependent relationship existing among the fields; and aggregating the dependent fields to obtain an aggregated target field. By the method and the device, the problems of complex data aggregation and low manual programming efficiency in the related technology are solved.

Description

Method and device for data aggregation, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a method and apparatus for data aggregation, an electronic device, and a storage medium.
Background
The web side (webpage version of the computer side) generally needs to acquire or submit data from a server to perform operations such as page rendering or interactive feedback with a user; the common cooperation is divided into: the rear end is responsible for developing an interface and butting a database; the front end is responsible for developing pages and calling interfaces.
Under a complex interaction scenario, the front end generally needs to manually request multiple interfaces to aggregate data to meet service requirements, for example: the commodity total information is generally formed by combining multi-dimensional information such as commodity basic information, inventory information, pricing information, logistics information, order information, associated merchant information, associated purchaser information and the like; the method of acquiring complete information under the complex interaction of the front end is generally to manually request the 4 commodity information interfaces and the 2 associated interfaces to acquire data and then aggregate the data.
Therefore, when the feedback requirement can be met after the data aggregation of a plurality of interfaces is needed in the business handling process, the related technology has the problems of complex data aggregation and low manual programming efficiency.
Disclosure of Invention
The present disclosure provides a method and apparatus for data aggregation, an electronic device, and a storage medium, so as to at least solve the problems of complex data aggregation and low manual programming efficiency in the related art.
According to one aspect of an embodiment of the present disclosure, there is provided a method of data aggregation, the method comprising:
acquiring a query target statement;
acquiring a plurality of dependent fields associated with fields to be queried corresponding to the query target statement according to the query target statement and a dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and dependent relations existing among the fields;
and aggregating the dependent fields to obtain an aggregated target field.
According to another aspect of the embodiments of the present disclosure, there is also provided an apparatus for data aggregation, including:
the first acquisition module is used for acquiring the query target statement;
the second acquisition module is used for acquiring a plurality of dependent fields associated with the fields to be queried corresponding to the query target statement according to the query target statement and the dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and the dependent relationship existing among the fields;
and the first aggregation module is used for aggregating the dependent fields to obtain an aggregated target field.
Optionally, the apparatus further comprises:
the third obtaining module is used for determining the protocol specification of the interface to the fields according to the preset protocol before obtaining a plurality of dependent fields associated with the fields to be queried corresponding to the query target statement according to the query target statement and the dependent view;
a first determining module, configured to determine the dependency relationship according to the protocol specification;
and the obtaining module is used for obtaining the dependent view according to the dependent relation.
Optionally, the first determining module includes:
a definition module, configured to define key fields included in the interface according to the protocol specification;
and the establishing module is used for establishing the dependency relationship by utilizing the key field.
Optionally, the first obtaining module includes:
the first determining unit is used for determining the field to be queried;
the second determining unit is used for determining a corresponding target model according to the field to be queried;
the first acquisition unit is used for acquiring a target level drilled circularly, wherein the value of the target level is larger than or equal to a preset value;
and the generating unit is used for generating the query target statement according to the field to be queried, the target model and the target level.
Optionally, the second acquisition module includes:
and the second acquisition unit is used for acquiring the dependent field according to the target level and the dependent view under the condition that the incidence relation between the target model where the field to be queried is located and other models is determined, wherein the incidence relation between the target model and other models is contained in the dependent view.
Optionally, the apparatus further comprises:
the second determining module is used for determining a corresponding target model according to the field to be queried after the query target statement is acquired;
a fourth obtaining module, configured to obtain at least a preset number of attribute information that is dependent on the field to be queried in the target model under the condition that it is determined that the target model in which the field to be queried is located has no association relationship with other models;
and the second aggregation module is used for aggregating the attribute information to obtain the aggregated target field.
Optionally, the apparatus further comprises:
the first establishing module is used for establishing a first association relation between a plurality of fields and the interfaces to which the fields belong before the corresponding target model is determined according to the fields to be queried, wherein the fields to be queried are contained in the fields;
the second building module is used for building a second association relation between a plurality of interfaces and the model to which the interfaces belong, wherein the target model is contained in the model;
and the third determining module is used for determining a third association relation between the field and the model according to the second association relation and the first association relation.
According to yet another aspect of the embodiments of the present disclosure, there is also provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein the memory is used for storing a computer program; a processor for performing the method steps of any of the embodiments described above by running the computer program stored on the memory.
According to a further aspect of the disclosed embodiments there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the method steps of any of the embodiments described above when run.
In the embodiment of the disclosure, by utilizing a plurality of fields in a plurality of interfaces meeting a preset protocol and a dependency view constructed by the dependency relationship existing among the fields, a plurality of dependency fields associated with a field to be queried corresponding to a query target statement are aggregated, so that which interfaces should be requested is automatically identified, how data are aggregated, and automatic data aggregation and processing are realized, and further the problems of complex data aggregation and low manual programming efficiency in the related art are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment for a method of data aggregation provided in accordance with some embodiments of the present disclosure;
FIG. 2 is a flow diagram of a method of data aggregation provided in accordance with some embodiments of the present disclosure;
FIG. 3 is a schematic diagram of an association relationship between interfaces and fields provided in accordance with some embodiments of the present disclosure;
FIG. 4 is a schematic illustration of associations between models using primary and foreign keys provided in accordance with some embodiments of the present disclosure;
FIG. 5 is a block diagram of an apparatus for data aggregation provided in accordance with some embodiments of the present disclosure;
fig. 6 is a block diagram of an electronic device provided in accordance with some embodiments of the present disclosure.
Detailed Description
In order that those skilled in the art will better understand the present disclosure, a technical solution in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure, shall fall within the scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of an embodiment of the present disclosure, a method of data aggregation is provided. Alternatively, in the present embodiment, the above-described data aggregation method may be applied to a hardware environment as shown in fig. 1. As shown in fig. 1, the terminal 102 may include a memory 104, a processor 106, and a display 108 (optional components). The terminal 102 may be communicatively coupled to a server 112 via a network 110, the server 112 being operable to provide services (e.g., application services, etc.) to the terminal or to clients installed on the terminal, and a database 114 may be provided on the server 112 or independent of the server 112 for providing data storage services to the server 112. In addition, a processing engine 116 may be run in the server 112, which processing engine 116 may be used to perform the steps performed by the server 112.
Alternatively, the terminal 102 may be, but is not limited to, a terminal capable of calculating data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), a notebook computer, a PC (Personal Computer ) or the like, which may include, but is not limited to, a wireless network or a wired network. Wherein the wireless network comprises: bluetooth, WIFI (Wireless Fidelity ) and other networks that enable wireless communications. The wired network may include, but is not limited to: wide area network, metropolitan area network, local area network. The server 112 may include, but is not limited to, any hardware device that can perform calculations.
In addition, in this embodiment, the method for data aggregation may be applied to, but not limited to, a stand-alone processing device with a relatively high processing capability, without data interaction. For example, the processing device may be, but is not limited to, a more processing-capable terminal device, i.e., the various operations of the above-described method of data aggregation may be integrated into a single processing device. The above is merely an example, and is not limited in any way in the present embodiment.
Alternatively, in this embodiment, the method of data aggregation may be performed by the server 112, or may be performed by the terminal 102, or may be performed by both the server 112 and the terminal 102. The method for the terminal 102 to perform data aggregation according to the embodiments of the present disclosure may also be performed by a client installed thereon.
Taking a server as an example, fig. 2 is a schematic flow chart of a method for data aggregation provided according to some embodiments of the present disclosure, as shown in fig. 2, a flow of the method may include the following steps:
step S201, a query target sentence is acquired.
Alternatively, in the embodiment of the present disclosure, the user may select or input a query target sentence at the terminal, and the server side may receive the query target sentence.
Step S202, a plurality of dependent fields associated with the fields to be queried corresponding to the query target statement are obtained according to the query target statement and the dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and the dependent relationship existing among the fields.
Optionally, the embodiments of the present disclosure may perform interface registration according to a defined preset protocol. Specifically, a dependency view is constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and dependency relationships existing among the fields, then a plurality of dependency fields associated with a statement to be queried can be found according to the statement to be queried of a query target statement and in combination with the dependency view, wherein the dependency fields can be understood as a plurality of interfaces to be accessed when a final result of the statement to be queried is acquired, and because each interface can contain a plurality of fields, the fields to be returned together are called as dependency fields.
Step S203, aggregating the dependent fields to obtain an aggregated target field.
Optionally, the multiple dependency fields are aggregated, and then an aggregated field, referred to as a target field, is obtained. It should be noted that the number of the dependent fields should be equal to or greater than 2, so that data aggregation can be achieved.
In the embodiment of the disclosure, by utilizing a plurality of fields in a plurality of interfaces meeting a preset protocol and a dependency view constructed by the dependency relationship existing among the fields, a plurality of dependency fields associated with a field to be queried corresponding to a query target statement are aggregated, so that which interfaces should be requested is automatically identified, how data are aggregated, and automatic data aggregation and processing are realized, and further the problems of complex data aggregation and low manual programming efficiency in the related art are solved.
As an alternative embodiment, before acquiring the multiple dependent fields associated with the field to be queried corresponding to the query target statement according to the query target statement and the dependent view, the method further includes:
determining the protocol specification of the interface to the field according to a preset protocol;
determining a dependency relationship according to the protocol specification;
and obtaining the dependent view according to the dependent relationship.
Optionally, in the embodiment of the present disclosure, the protocol rule of the interface to the fields may be determined according to a preset protocol set in advance, that is, which places define which fields are all constrained by the corresponding protocol specification, so that the dependency relationship between the fields may be determined according to the protocol rule, and the dependency view formed between the interfaces may be obtained after the dependency relationship is provided.
In the embodiment of the disclosure, a plurality of entities are aggregated into a dependent view mode to obtain data as required.
As an alternative embodiment, determining the dependency according to the protocol specification comprises:
defining key fields contained in the interface according to protocol specifications;
and establishing a dependency relationship by utilizing the key field.
Alternatively, in the embodiment of the present disclosure, the definition interface is defined by a protocol, which of a plurality of fields corresponding to the definition interface may be defined as key fields, where the key fields may be a primary key and a foreign key. As shown in fig. 3, the relationship between interface personBase and field id, name, age is identified using a line arrow, where field id and field name are defined as key fields.
After the key fields are defined, a dependency view formed by the association of the primary key and the foreign key as shown in fig. 4 can be established, and then the dependency relationship between the fields is established, which is also the dependency relationship between interfaces and the dependency relationship between models to which the interfaces belong.
In the embodiment of the disclosure, the standard of the constructed interface dependency view and the standard and implementation of the assembled software product based on the optional conception are constructed according to key fields in the interface.
As an alternative embodiment, obtaining the query target statement includes:
determining a field to be queried;
determining a corresponding target model according to the field to be queried;
obtaining a target level drilled circularly, wherein the value of the target level is larger than or equal to a preset value;
and generating a query target statement according to the field to be queried, the target model and the target level.
Alternatively, first, as can be derived from fig. 4, fig. 4 contains 4 models, each model is composed of 3 parts from top to bottom, model names, all interfaces contained by the models, and all fields contained by the interfaces; the dependency relationship between person, weapon, pet, house models in fig. 4 forms a dependency view through the association of a primary key and an external key, and is marked by a connecting line arrow.
It should be noted that, the external key of one model is the main key of another model, and the function of the main key and the external key is to realize the automatic association between the models. When fields in other models than the current model are acquired, interfaces of the other models can be accessed according to the dependent view, and then the required data fields are obtained.
After the server obtains the fields to be queried, obtaining which data fields are declared to be obtained; and then determining a root view, namely a target model to which the root view belongs, according to the field to be queried. For example, when the user selects a field to be queried, the beginning field of the field to be queried is a corresponding target model, for example, query personname, and person is a person model.
After the target model is positioned, a defined target level for circulating drill-down is obtained, wherein the value of the target level is more than or equal to a preset value, such as 2. The target level of the loop drill-down is actually the maximum level of the field with the association relation with the field to be queried, and the optimal value is 2.
And taking the target model, the field to be queried and the target level as parameters for generating a query target statement.
In the embodiment of the disclosure, the subsequent automatic combination of interfaces through the dependent view is realized by setting the query target statement, so that the automatic data aggregation is completed.
As an alternative embodiment, according to a query target statement and a dependency view, acquiring a plurality of dependency fields associated with a field to be queried corresponding to the query target statement includes:
under the condition that the association relation between the target model where the field to be queried is located and other models is determined, obtaining a dependent field according to the target hierarchy and the dependent view, wherein the dependent view contains the association relation between the target model and the other models.
Optionally, after the query target statement is found, whether other models associated with the target model exist or not is determined according to the dependency view, as shown in fig. 4, if the target model is a pet model, the other models associated with the pet model are person models, and a dependency field with a dependency relationship with a field to be queried is obtained according to the determined target level and the dependency view.
For example, if the query target sentence is the age of the pet owner of small intensity, the target hierarchy is 3, at this time, the field to be queried is a person model, the corresponding target model is a person model, at this time, a model associated with the person model is a pet model, an external key petName of the person model is found through a main key name of the pet model, then a main key name field of the person model is found, then an age field in the person model is found, the main key name field of the pet model and the main key name field and the age field of the person model are used as dependent fields, data aggregation is performed, and an aggregation result is returned.
In the embodiment of the disclosure, the SDK of one web end is provided for interface registration and automatic data aggregation, so that the visual management of the interface and the automatic data aggregation are realized.
As an alternative embodiment, after obtaining the query target statement, the method further comprises:
determining a corresponding target model according to the field to be queried;
under the condition that the target model where the field to be queried is located and other models are not in association relation, acquiring at least preset quantity of attribute information which is dependent on the field to be queried in the target model;
and aggregating the attribute information to obtain an aggregated target field.
Optionally, in the embodiment of the present disclosure, if there is no association between the target model corresponding to the field to be queried and other models, data aggregation may be implemented only by relying on multiple fields included in each interface, so that the dependency view is not combined.
Specifically, under the condition that the target model where the field to be queried is located and other models have no association relation, at least preset quantity of attribute information which is dependent on the field to be queried, such as the age of query three, is acquired in the target model, at this time, the positioning target model is a person model, then a name field in a personBase interface is found, then an age field is found, and then data in the name field and the age field are aggregated, so that the aggregated target field is obtained.
It should be noted that, the number of attribute information dependent on the field to be queried needs to be greater than or equal to the preset number 2, and aggregation is only meaningful.
In the embodiment of the disclosure, the SDK of one web end is provided for interface registration and automatic data aggregation, so that the visual management of the interface and the automatic data aggregation are realized.
As an alternative embodiment, before determining the corresponding object model according to the field to be queried, the method further comprises:
establishing a first association relationship between a plurality of fields and the belonging interfaces, wherein the fields to be queried are contained in the fields;
establishing a second association relationship between the interfaces and the model to which the interfaces belong, wherein the target model is contained in the model;
and determining a third association relation between the field and the model according to the second association relation and the first association relation.
Alternatively, as can be derived from fig. 3 and fig. 4, each interface may include a plurality of fields, and a first association relationship between the interface and the fields may be established; and each model comprises a plurality of interfaces, at this time, a second association relationship between the interfaces and the model to which the interfaces belong can be established, and after the first association relationship and the second association relationship are provided, a third association relationship between the fields and the model can be deduced.
Since the field to be queried is included in the fields and the object model is included in the models, the corresponding object model can be determined after the field to be queried is acquired.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all of the preferred embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM (Read-Only Memory)/RAM (Random Access Memory), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present disclosure.
According to another aspect of the embodiments of the present disclosure, there is also provided an apparatus for data aggregation for implementing the above-mentioned method for data aggregation. Fig. 5 is a block diagram of an apparatus for data aggregation provided according to some embodiments of the present disclosure, as shown in fig. 5, the apparatus may include:
a first obtaining module 501, configured to obtain a query target statement;
the second obtaining module 502 is configured to obtain, according to a query target statement and a dependency view, a plurality of dependency fields associated with a field to be queried corresponding to the query target statement, where the dependency view is a view constructed according to a plurality of fields in a plurality of interfaces that satisfy a preset protocol and a dependency relationship existing between the fields;
the first aggregation module 503 is configured to aggregate the dependent fields to obtain an aggregated target field.
It should be noted that, the first obtaining module 501 in this embodiment may be configured to perform the above-mentioned step S201, the second obtaining module 502 in this embodiment may be configured to perform the above-mentioned step S202, and the first aggregation module 503 in this embodiment may be configured to perform the above-mentioned step S203.
Through the module, the plurality of fields in the plurality of interfaces meeting the preset protocol and the dependency view constructed by the dependency relationship existing among the fields are utilized to aggregate the plurality of dependency fields related to the field to be queried corresponding to the query target statement, so that the interfaces which should be requested are automatically identified, how the data are aggregated is automatically identified, the automatic data aggregation and processing are realized, and the problems of complex data aggregation and low manual programming efficiency in the related technology are solved.
As an alternative embodiment, the apparatus further comprises:
the third acquisition module is used for determining the protocol specification of the interface to the fields according to a preset protocol before acquiring a plurality of dependent fields associated with the fields to be queried corresponding to the query target statement according to the query target statement and the dependent view;
the first determining module is used for determining a dependency relationship according to protocol regulations;
and the obtaining module is used for obtaining the dependent view according to the dependent relation.
As an alternative embodiment, the first determining module includes:
the definition module is used for defining key fields contained in the interface according to protocol regulations;
and the establishing module is used for establishing the dependency relationship by utilizing the key fields.
As an alternative embodiment, the first acquisition module includes:
the first determining unit is used for determining a field to be queried;
the second determining unit is used for determining a corresponding target model according to the field to be queried;
the first acquisition unit is used for acquiring a target level drilled circularly, wherein the value of the target level is larger than or equal to a preset value;
and the generating unit is used for generating a query target statement according to the field to be queried, the target model and the target level.
As an alternative embodiment, the second acquisition module includes:
the second obtaining unit is used for obtaining the dependent field according to the target level and the dependent view under the condition that the incidence relation between the target model and other models of the field to be queried is determined, wherein the dependent view contains the incidence relation between the target model and the other models.
As an alternative embodiment, the apparatus further comprises:
the second determining module is used for determining a corresponding target model according to the field to be queried after acquiring the query target statement;
the fourth acquisition module is used for acquiring at least preset quantity of attribute information which is dependent on the field to be queried in the target model under the condition that the target model in which the field to be queried is positioned and other models are not in association relation;
and the second aggregation module is used for aggregating the attribute information to obtain an aggregated target field.
As an alternative embodiment, the apparatus further comprises:
the first establishing module is used for establishing a first association relation between a plurality of fields and the affiliated interfaces before determining the corresponding target model according to the fields to be queried, wherein the fields to be queried are contained in the fields;
the second building module is used for building a second association relation between the interfaces and the model to which the interfaces belong, wherein the target model is contained in the model;
and the third determining module is used for determining a third association relation between the field and the model according to the second association relation and the first association relation.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, where the hardware environment includes a network environment.
According to yet another aspect of the embodiments of the present disclosure, there is also provided an electronic device, which may be a server, a terminal, or a combination thereof, for implementing the above-described data aggregation method.
Fig. 6 is a block diagram of an electronic device provided in accordance with some embodiments of the present disclosure, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other via the communication bus 604, wherein,
a memory 603 for storing a computer program;
the processor 601 is configured to execute the computer program stored in the memory 603, and implement the following steps:
acquiring a query target statement;
acquiring a plurality of dependent fields associated with fields to be queried corresponding to a query target statement according to the query target statement and a dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and the dependent relationship existing among the fields;
and aggregating the dependent fields to obtain an aggregated target field.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, as shown in fig. 6, the memory 603 may include, but is not limited to, a first acquiring module 501, a second acquiring module 502, and an aggregating module 503 in the apparatus including the data aggregation. In addition, other module units in the apparatus for data aggregation may be included but are not limited to the above, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In addition, the electronic device further includes: and the display is used for displaying the result of data aggregation.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be understood by those skilled in the art that the structure shown in fig. 6 is only schematic, and the device implementing the data aggregation method may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 6 is not limited to the structure of the electronic device described above. For example, the terminal device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in fig. 6, or have a different configuration than shown in fig. 6.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
According to yet another aspect of the disclosed embodiments, there is also provided a storage medium. Alternatively, in the present embodiment, the above-described storage medium may be used for program code for executing the method of data aggregation.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
acquiring a query target statement;
acquiring a plurality of dependent fields associated with fields to be queried corresponding to a query target statement according to the query target statement and a dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and the dependent relationship existing among the fields;
and aggregating the dependent fields to obtain an aggregated target field.
Alternatively, specific examples in the present embodiment may refer to examples described in the above embodiments, which are not described in detail in the present embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
According to yet another aspect of embodiments of the present disclosure, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method steps of data aggregation in any of the embodiments described above.
The foregoing embodiment numbers of the present disclosure are merely for description and do not represent advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method for data aggregation of various embodiments of the present disclosure.
In the foregoing embodiments of the present disclosure, the descriptions of the various embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present disclosure, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and are merely a logical functional division, and there may be other manners of dividing the apparatus in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the present embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present disclosure, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present disclosure, which are intended to be comprehended within the scope of the present disclosure.

Claims (10)

1. A method of data aggregation, the method comprising:
acquiring a query target statement;
acquiring a plurality of dependent fields associated with fields to be queried corresponding to the query target statement according to the query target statement and a dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and dependent relations existing among the fields;
and aggregating the dependent fields to obtain an aggregated target field.
2. The method of claim 1, wherein prior to the obtaining a plurality of dependency fields associated with a field to be queried corresponding to the query target statement from the query target statement and dependency view, the method further comprises:
determining the protocol specification of the interface to the field according to the preset protocol;
determining the dependency according to the protocol specification;
and obtaining the dependent view according to the dependent relationship.
3. The method of claim 2, wherein said determining said dependency according to said protocol specification comprises:
defining key fields contained in the interface according to the protocol specification;
and establishing the dependency relationship by utilizing the key field.
4. The method of claim 3, wherein the obtaining the query target statement comprises:
determining the field to be queried;
determining a corresponding target model according to the field to be queried;
obtaining a target level drilled circularly, wherein the value of the target level is larger than or equal to a preset value;
and generating the query target statement according to the field to be queried, the target model and the target level.
5. The method of claim 4, wherein the obtaining, from the query target statement and the dependency view, a plurality of dependency fields associated with a field to be queried corresponding to the query target statement, comprises:
and under the condition that the association relation between the target model where the field to be queried is located and other models is determined, acquiring the dependent field according to the target level and the dependent view, wherein the dependent view contains the association relation between the target model and other models.
6. The method of claim 1, wherein after the obtaining the query target statement, the method further comprises:
determining a corresponding target model according to the field to be queried;
acquiring at least preset quantity of attribute information which is dependent on the field to be queried in the target model under the condition that the target model where the field to be queried is positioned and other models are not in association relation;
and aggregating the attribute information to obtain the aggregated target field.
7. The method according to claim 4 or 6, wherein before said determining a corresponding object model from the field to be queried, the method further comprises:
establishing a first association relationship between a plurality of fields and the interfaces to which the fields belong, wherein the fields to be queried are contained in the fields;
establishing a second association relationship between a plurality of interfaces and a model to which the interfaces belong, wherein the target model is contained in the model;
and determining a third association relation between the field and the model according to the second association relation and the first association relation.
8. An apparatus for data aggregation, the apparatus comprising:
the first acquisition module is used for acquiring the query target statement;
the second acquisition module is used for acquiring a plurality of dependent fields associated with the fields to be queried corresponding to the query target statement according to the query target statement and the dependent view, wherein the dependent view is a view constructed according to a plurality of fields in a plurality of interfaces meeting a preset protocol and the dependent relationship existing among the fields;
and the aggregation module is used for aggregating the dependent fields to obtain an aggregated target field.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, characterized in that,
the memory is used for storing a computer program;
the processor is configured to perform the method steps of any of claims 1 to 7 by running the computer program stored on the memory.
10. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program, when executed by a processor, implements the method steps of any of claims 1 to 7.
CN202310173733.4A 2023-02-23 2023-02-23 Method and device for data aggregation, electronic equipment and storage medium Pending CN116244365A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310173733.4A CN116244365A (en) 2023-02-23 2023-02-23 Method and device for data aggregation, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310173733.4A CN116244365A (en) 2023-02-23 2023-02-23 Method and device for data aggregation, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116244365A true CN116244365A (en) 2023-06-09

Family

ID=86632746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310173733.4A Pending CN116244365A (en) 2023-02-23 2023-02-23 Method and device for data aggregation, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116244365A (en)

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
CN108363602B (en) Intelligent UI (user interface) layout method and device, terminal equipment and storage medium
CN111104635B (en) Method and device for generating form webpage
CN110969001B (en) Feedback information generation method and device, storage medium, processor and terminal
CN109597974B (en) Report generation method and device
CN110599354A (en) Online reconciliation method, system, computer device and computer-readable storage medium
CN113220657A (en) Data processing method and device and computer equipment
CN111651140B (en) Service method and device based on workflow
CN110852559A (en) Resource allocation method and device, storage medium and electronic device
CN112306471A (en) Task scheduling method and device
CN110941634A (en) Data processing method and device, storage medium and electronic device
CN114610372A (en) Processing method and device for review file, storage medium, processor and terminal
CN112560939B (en) Model verification method and device and computer equipment
CN105302556A (en) Calculation realization method and system and server apparatus
CN107147732A (en) Image processing method, device, client and service end
CN116244365A (en) Method and device for data aggregation, electronic equipment and storage medium
CN113127099B (en) Server configuration method, device, equipment and storage medium
CN116205697A (en) Resource recommendation method and resource recommendation device for virtual public cloud
CN114564925A (en) Report generation method and device, electronic equipment and readable storage medium
CN115481932B (en) ERP system database trigger generation method, storage medium and electronic device
Kanagasabai et al. Ec2bargainhunter: It's easy to hunt for cost savings on amazon ec2!
CN109344166B (en) Database monitoring method, computer readable storage medium and terminal device
CN111507095B (en) Method and device for generating referee document, storage medium and processor
US20230274304A1 (en) Merging a two or more multi-level user structures into a multi-line user structure and simulating sponsorship of new members
CN115082119B (en) Data feedback method, device, electronic equipment, storage medium and program product

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