CN113157786B - User information acquisition method and device, storage medium and electronic device - Google Patents

User information acquisition method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113157786B
CN113157786B CN202110358367.0A CN202110358367A CN113157786B CN 113157786 B CN113157786 B CN 113157786B CN 202110358367 A CN202110358367 A CN 202110358367A CN 113157786 B CN113157786 B CN 113157786B
Authority
CN
China
Prior art keywords
user information
information
application
acquiring
library
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.)
Active
Application number
CN202110358367.0A
Other languages
Chinese (zh)
Other versions
CN113157786A (en
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110358367.0A priority Critical patent/CN113157786B/en
Publication of CN113157786A publication Critical patent/CN113157786A/en
Application granted granted Critical
Publication of CN113157786B publication Critical patent/CN113157786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method and a device for acquiring user information, a storage medium and an electronic device, wherein the method for acquiring the user information comprises the following steps: acquiring first user information and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page. By adopting the technical scheme, the problem that the application front page and the application back interface are required to be frequently interacted when the application frequently acquires information in the related technology is solved.

Description

User information acquisition method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for acquiring user information, a storage medium, and an electronic device.
Background
With the development of the internet, users are moving from a PC end to a mobile end, and the representative APP of the mobile end is the most closely contacted product in life of people, and the most widely used product is obtained. Existing applications acquire information by calling back-end interfaces or using containers. Through the prior art, when the application frequently acquires information, the application front-end page and the application back-end interface are required to frequently interact, and the user information is not well multiplexed and stored. That is, if similar user information is required for the appearance of multiple scenes, multiple interactions are required to meet the demand. The above-described problems are particularly acute in hybrid applications developed from hybrid H5 pages.
Aiming at the problem that when the application frequently acquires information, the application front page needs to interact with the application back interface frequently in the related technology, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the invention provides a method and a device for acquiring user information, a storage medium and an electronic device, which are used for solving the problem that in the related art, when information is frequently acquired by application, a front page of the application needs to be frequently interacted with a back interface of the application.
According to an embodiment of the present invention, there is provided a method for acquiring user information, including: acquiring first user information and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page.
Optionally, the obtaining second user information corresponding to the request information from the first user information stored in the user information database includes: determining information sub-libraries corresponding to the user information interaction layer, wherein the user information main library corresponds to a plurality of information sub-libraries; and receiving and storing the second user information through the information sub-library.
Optionally, before the first user information is acquired, the method further includes: three first global variables are defined in the user information gallery: defining a first variable, wherein the first variable is used for indicating user information acquired from a back-end container of an application; defining a second variable, wherein the second variable is used for indicating user information acquired from a back-end interface of the application; and defining a third variable, wherein the third variable is used for indicating target user information obtained after combining the user information obtained from the back-end container of the application and the user information obtained from the back-end interface of the application.
Optionally, after defining the third variable, the method includes: acquiring user information acquired from a back-end container and user information acquired from a back-end interface, wherein the user information and the user information belong to the same front-end page; and combining the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, to obtain a plurality of target user information.
Optionally, before receiving and saving the second user information through the information repository, the method further includes: and defining a plurality of second global variables in the information sub-base, wherein each second global variable is used for indicating each piece of data corresponding to the second user information.
Optionally, after receiving and saving the second user information through the information repository, the method further includes: acquiring page frame information corresponding to the information sub-database; and displaying the second user information on the frame indicated by the page frame information.
According to still another embodiment of the present invention, there is also provided an apparatus for acquiring user information, including: the first acquisition module is used for acquiring first user information and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; the second acquisition module is used for receiving the request information from the user information interaction layer through the user information total library and acquiring second user information corresponding to the request information from the first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with the front-end page.
Optionally, the second obtaining module is further configured to: determining information sub-libraries corresponding to the user information interaction layer, wherein the user information main library corresponds to a plurality of information sub-libraries; and receiving and storing the second user information through the information sub-library.
According to yet another embodiment of the present invention, there is also provided a computer-readable storage medium comprising a stored program, wherein the program when run performs the method as set forth in any one of the preceding claims.
According to yet another embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to perform the method of any of the above by means of the computer program.
According to the invention, the first user information is acquired and stored in the user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page. That is, first user information is acquired and stored in a user information repository, and after the user information repository receives request information from a user information interaction layer, second user information corresponding to the request information is acquired from the first user information stored in the user information repository. By adopting the technical scheme, the problem that the application front-end page and the application back-end interface are required to be frequently interacted when the application frequently acquires information in the related technology is solved, so that the interaction efficiency of the application front-end page and the application back-end interface is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for acquiring user information according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for acquiring user information according to an embodiment of the present invention;
fig. 3 is a schematic diagram (a) of a method for acquiring user information according to an embodiment of the present invention;
fig. 4 is a schematic diagram (ii) of a method for acquiring user information according to an embodiment of the present invention;
fig. 5 is a block diagram of a configuration of a user information acquisition apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor (Microprocessor Unit, abbreviated MPU) or programmable logic device (Programmable logic device, abbreviated PLD)) and a memory 104 for storing data, and in an exemplary embodiment, the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, a mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for acquiring user information in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for obtaining user information is provided and applied to the mobile terminal, and fig. 2 is a schematic flow chart of a method for obtaining user information according to an embodiment of the present invention, where the flow chart includes the following steps:
step S202: acquiring first user information and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application;
step S204: and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page.
According to the invention, the first user information is acquired and stored in the user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page. That is, first user information is acquired and stored in a user information repository, and after the user information repository receives request information from a user information interaction layer, second user information corresponding to the request information is acquired from the first user information stored in the user information repository. By adopting the technical scheme, the problem that the application front-end page and the application back-end interface are required to be frequently interacted when the application frequently acquires information in the related technology is solved, so that the interaction efficiency of the application front-end page and the application back-end interface is improved.
In step S204, obtaining second user information corresponding to the request information from the first user information stored in the user information database, including: determining information sub-libraries corresponding to the user information interaction layer, wherein the user information main library corresponds to a plurality of information sub-libraries; and receiving and storing the second user information through the information sub-library.
It should be noted that, in the process of obtaining the user information, the information library is added in the invention. The invention acquires first user information and stores the first user information in a user information general library, wherein the first user information comprises at least one of the following components: user information acquired from a back-end container of an application, and user information acquired from a back-end interface of the application. It should be noted that, the user information obtained from the back-end container of the application may be back-end container information, and the user information obtained from the back-end interface of the application may be back-end interface information. After the user information repository obtains the first user information, the user information repository may receive the request information from the user information interaction layer. And acquiring second user information corresponding to the request information from the first user information stored in the user information database according to the request information.
In the process of acquiring the user information, the invention can increase information sub-libraries besides increasing the information general libraries. After second user information corresponding to the request information is obtained from first user information stored in the user information general library according to the request information, determining an information sub-library corresponding to the user information interaction layer, wherein the user information general library corresponds to a plurality of information sub-libraries, and receiving and storing the second user information through the information sub-libraries. It should be noted that, in the application, each page corresponds to one information sub-library. The first user information comprises all user information of the application back end, and the second user information only comprises user information of the corresponding page or the corresponding information sub-base. The user information interaction layer is actually the application front-end page interaction layer.
Before performing step S202, i.e. before acquiring the first user information, the method further comprises: three first global variables are defined in the user information gallery: defining a first variable, wherein the first variable is used for indicating user information acquired from a back-end container of an application; defining a second variable, wherein the second variable is used for indicating user information acquired from a back-end interface of the application; and defining a third variable, wherein the third variable is used for indicating target user information obtained after combining the user information obtained from the back-end container of the application and the user information obtained from the back-end interface of the application.
It should be noted that, the existing user information obtaining manner is that the Js interaction layer of each page is obtained through asynchronous call of an interface or asynchronous call of a container end API, because the back end interface and the container end do not make customized interfaces or APIs for a single front end page, when the single front end page obtains the user information, other useless data returned in the interfaces or APIs are necessarily obtained beyond the user information required by the current page, and each page interaction can call the data of the back end interface or the container end once.
In the process of acquiring the user information, the invention can increase information sub-libraries besides increasing the information general libraries. The information master library only needs to acquire the user information once from the rear end interface or the container end, and after acquiring the user information, the information master library transmits second user information corresponding to the request information to the information sub-library according to the request information. When user information is needed for each page, the user information is only needed to be acquired from the corresponding information sub-base. The information total library and the information sub-library can be regarded as front-end user information distribution libraries. Therefore, the front-end user information collection and distribution library can be used for reducing the possibility of occurrence of interaction reduction problems between the front end and other ends when the front end calls the container end API or the rear end interface for a single time, the front end trace the user information summarized and processed by the user information to be single to provide convenience for the front-end joint debugging test, and the existence of the sub-libraries enables the use of the user information by a single page to be more efficient and quicker, and the joint use of the integrated libraries and the sub-libraries enables the flow direction of the user data in the development process to be clear, trace the single line and multiplex efficiently.
The invention defines three first global variables in the user information master library: the first variable is used for indicating user information acquired from a back-end container of the application; the second variable is used for indicating user information acquired from a back-end interface of the application; and the third variable is used for indicating the target user information obtained after the user information obtained from the back-end container of the application and the user information obtained from the back-end interface of the application are combined and processed. Through the technical means, the user data can flow clearly and trace to the single line in the development process.
In an alternative embodiment, after defining the third variable, the method includes: acquiring user information acquired from a back-end container and user information acquired from a back-end interface, wherein the user information and the user information belong to the same front-end page; and combining the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, to obtain a plurality of target user information.
Before defining the third variable in the information library, the invention needs to acquire the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, and combine the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, to obtain a plurality of target user information, wherein the combination can combine the container information and the back-end interface information. The target user information is indicated by a defined third variable.
Before performing step S204, that is, before receiving and saving the second user information through the information repository, the method further includes: and defining a plurality of second global variables in the information sub-base, wherein each second global variable is used for indicating each piece of data corresponding to the second user information.
It should be noted that, in addition to defining global variables in the information database, the present invention also needs to define a plurality of second global variables in the information database. The invention defines a plurality of second global variables in the information sub-database, and then indicates each piece of data corresponding to the second user information received and stored by the information sub-database through the plurality of second global variables. For example, one second global variable may be defined to indicate a user name, another second global variable to indicate a user image, and so on.
After performing step S204, that is, after receiving and saving the second user information through the information repository, the method further includes: acquiring page frame information corresponding to the information sub-database; and displaying the second user information on the frame indicated by the page frame information.
It should be noted that, after the second user information is received and stored through the information database, page frame information corresponding to the information database is also required to be obtained. The page frame information is related information of the page frame, for example, the page frame information may include whether a page button is clickable, whether a sliding frame is slidable, whether a display frame may display page information such as content, and the like. And finally, displaying the second user information on the frame indicated by the page frame information. Such as showing the user name in a display box.
For a better understanding of the above technical solution, the following alternative flowcharts are used to illustrate the overall flow of speech recognition.
Fig. 3 is a schematic diagram (a) of a method for acquiring user information according to an embodiment of the present invention, as shown in fig. 3:
s302: the information collection library collects and acquires first user information from an APP rear-end container and an APP rear-end interface;
s304: after receiving request information from a user information interaction layer, the information master library acquires second user information corresponding to the request information from first user information stored in the user information master library, and distributes the second user information to sub-libraries of each page, wherein the user information interaction layer has a one-to-one correspondence with a front page;
s306: the front-end page interaction layer (namely the user information interaction layer) transmits second user information and page frame information to the corresponding front-end page;
s308: and displaying the second user information on the frame indicated by the page frame information by the front-end page.
Fig. 4 is a schematic diagram (two) of a method for obtaining user information according to an embodiment of the present invention, as shown in fig. 4:
fig. 4 is a diagram showing the replacement of the front-end page interaction layer for information banking based on fig. 3, so that the user information is acquired more clearly. The user information database obtains and processes the user information from the container end and the rear end interface, and then the user information database distributes the user information to the user information database of the corresponding page for use, so that single-line flow of the user information is ensured, and the source of the user information is single, so that the multiplexing and tracing problems of the user information are solved.
The invention adds a layer of total library for acquiring and storing user information between the front page and the back end of the container, and adds a sub-library for acquiring and storing user information needed by the current page outside the original Html, css, js in each page. As can be seen from fig. 4, the user information collecting and distributing library is used for collecting and acquiring the user information from the container end and the rear end interface, distributing the user information to the sub-libraries of each page, unifying the sources of the user information, and adding the sub-libraries to different pages to use the user information required by the current page. And a layer of total library for acquiring and storing user information is added between the front-end page and the rear-end interface of the container, so that the user information from the container end and the rear-end interface is summarized, the source tracing of the user information is unified, the library is divided, the user information is acquired once, and frequent interactive calling is not needed. The user information sub-library is added in the interaction layer of the single page and is used for acquiring the user information in the user information main library, so that when a user accesses the single page, only the user information required by the current page is acquired, the data is purer and clean, no more redundant data exists, the method is quicker when the functions and the display of the page are combined, and meanwhile, when the problem is traced, the problem of tracing the current page can be found out by only finding out the corresponding data and the access source in the main library according to the sub-library. The user information collection and distribution library which jointly works with the user information collection library and the user information distribution library is used, so that the problems of user information collection and personalized use of the user information are solved, the multiplexing of the user information, the problem tracing and the joint debugging and testing in the development process are more visual and convenient, the user information acquisition becomes single call and multiple times of multiplexing, the interaction of the front end with the interfaces of the container end and the rear end is reduced, and the possibility of the occurrence of the problems is reduced.
According to the invention, the first user information is acquired and stored in the user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page. That is, first user information is acquired and stored in a user information repository, and after the user information repository receives request information from a user information interaction layer, second user information corresponding to the request information is acquired from the first user information stored in the user information repository. By adopting the technical scheme, the problem that the application front-end page and the application back-end interface are required to be frequently interacted when the application frequently acquires information in the related technology is solved, so that the interaction efficiency of the application front-end page and the application back-end interface is improved.
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 invention 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/RAM, 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 according to the embodiments of the present invention.
The embodiment also provides a device for obtaining the user information, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram showing a configuration of a user information acquisition apparatus according to an embodiment of the present invention; as shown in fig. 5, includes:
a first obtaining module 50, configured to obtain first user information, and store the first user information in a user information repository, where the first user information includes at least one of: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application;
and a second obtaining module 52, configured to receive, through the user information gallery, request information from a user information interaction layer, and obtain, from first user information stored in the user information gallery, second user information corresponding to the request information, where the user information interaction layer has a one-to-one correspondence with a front page.
According to the invention, the first user information is acquired and stored in the user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application; and receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front-end page. That is, first user information is acquired and stored in a user information repository, and after the user information repository receives request information from a user information interaction layer, second user information corresponding to the request information is acquired from the first user information stored in the user information repository. By adopting the technical scheme, the problem that the application front-end page and the application back-end interface are required to be frequently interacted when the application frequently acquires information in the related technology is solved, so that the interaction efficiency of the application front-end page and the application back-end interface is improved.
Optionally, the second obtaining module 52 is further configured to determine an information sub-library corresponding to the user information interaction layer, where the user information total library corresponds to a plurality of information sub-libraries; and receiving and storing the second user information through the information sub-library.
It should be noted that, in the process of obtaining the user information, the information library is added in the invention. The invention acquires first user information and stores the first user information in a user information general library, wherein the first user information comprises at least one of the following components: user information acquired from a back-end container of an application, and user information acquired from a back-end interface of the application. It should be noted that, the user information obtained from the back-end container of the application may be back-end container information, and the user information obtained from the back-end interface of the application may be back-end interface information. After the user information repository obtains the first user information, the user information repository may receive the request information from the user information interaction layer. And acquiring second user information corresponding to the request information from the first user information stored in the user information database according to the request information.
In the process of acquiring the user information, the invention can increase information sub-libraries besides increasing the information general libraries. After second user information corresponding to the request information is obtained from first user information stored in the user information general library according to the request information, determining an information sub-library corresponding to the user information interaction layer, wherein the user information general library corresponds to a plurality of information sub-libraries, and receiving and storing the second user information through the information sub-libraries. It should be noted that, in the application, each page corresponds to one information sub-library. The first user information comprises all user information of the application back end, and the second user information only comprises user information of the corresponding page or the corresponding information sub-base. The user information interaction layer is actually the application front-end page interaction layer.
Optionally, the first obtaining module 50 is further configured to define three first global variables in the user information gallery: defining a first variable, wherein the first variable is used for indicating user information acquired from a back-end container of an application; defining a second variable, wherein the second variable is used for indicating user information acquired from a back-end interface of the application; and defining a third variable, wherein the third variable is used for indicating target user information obtained after combining the user information obtained from the back-end container of the application and the user information obtained from the back-end interface of the application.
It should be noted that, the existing user information obtaining manner is that the Js interaction layer of each page is obtained through asynchronous call of an interface or asynchronous call of a container end API, because the back end interface and the container end do not make customized interfaces or APIs for a single front end page, when the single front end page obtains the user information, other useless data returned in the interfaces or APIs are necessarily obtained beyond the user information required by the current page, and each page interaction can call the data of the back end interface or the container end once.
In the process of acquiring the user information, the invention can increase information sub-libraries besides increasing the information general libraries. The information master library only needs to acquire the user information once from the rear end interface or the container end, and after acquiring the user information, the information master library transmits second user information corresponding to the request information to the information sub-library according to the request information. When user information is needed for each page, the user information is only needed to be acquired from the corresponding information sub-base. The information total library and the information sub-library can be regarded as front-end user information distribution libraries. Therefore, the front-end user information collection and distribution library can be used for reducing the possibility of occurrence of interaction reduction problems between the front end and other ends when the front end calls the container end API or the rear end interface for a single time, the front end trace the user information summarized and processed by the user information to be single to provide convenience for the front-end joint debugging test, and the existence of the sub-libraries enables the use of the user information by a single page to be more efficient and quicker, and the joint use of the integrated libraries and the sub-libraries enables the flow direction of the user data in the development process to be clear, trace the single line and multiplex efficiently.
The invention defines three first global variables in the user information master library: the first variable is used for indicating user information acquired from a back-end container of the application; the second variable is used for indicating user information acquired from a back-end interface of the application; and the third variable is used for indicating the target user information obtained after the user information obtained from the back-end container of the application and the user information obtained from the back-end interface of the application are combined and processed. Through the technical means, the user data can flow clearly and trace to the single line in the development process.
Optionally, the second obtaining module 52 is further configured to obtain user information obtained from a back-end container and user information obtained from a back-end interface, which belong to the same front-end page; and combining the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, to obtain a plurality of target user information.
Before defining the third variable in the information library, the invention needs to acquire the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, and combine the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, to obtain a plurality of target user information, wherein the combination can combine the container information and the back-end interface information. The target user information is indicated by a defined third variable.
Optionally, the second obtaining module 52 is further configured to define a plurality of second global variables in the information repository, where each second global variable is used to indicate each piece of data corresponding to the second user information.
It should be noted that, in addition to defining global variables in the information database, the present invention also needs to define a plurality of second global variables in the information database. The invention defines a plurality of second global variables in the information sub-database, and then indicates each piece of data corresponding to the second user information received and stored by the information sub-database through the plurality of second global variables. For example, one second global variable may be defined to indicate a user name, another second global variable to indicate a user image, and so on.
Optionally, the second obtaining module 52 is further configured to obtain page frame information corresponding to the information database; and displaying the second user information on the frame indicated by the page frame information.
It should be noted that, after the second user information is received and stored through the information database, page frame information corresponding to the information database is also required to be obtained. The page frame information is related information of the page frame, for example, the page frame information may include whether a page button is clickable, whether a sliding frame is slidable, whether a display frame may display page information such as content, and the like. And finally, displaying the second user information on the frame indicated by the page frame information. Such as showing the user name in a display box.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, acquiring first user information, and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application;
s2, receiving request information from a user information interaction layer through the user information database, and acquiring second user information corresponding to the request information from first user information stored in the user information database, wherein the user information interaction layer has a one-to-one correspondence with a front-end page.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring first user information, and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application;
s2, receiving request information from a user information interaction layer through the user information database, and acquiring second user information corresponding to the request information from first user information stored in the user information database, wherein the user information interaction layer has a one-to-one correspondence with a front-end page.
Optionally, in this optional embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and this embodiment is not repeated herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. The method for acquiring the user information is characterized by comprising the following steps:
acquiring first user information and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application;
receiving request information from a user information interaction layer through the user information total library, and acquiring second user information corresponding to the request information from first user information stored in the user information total library, wherein the user information interaction layer has a one-to-one correspondence with a front page, and acquiring second user information corresponding to the request information from the first user information stored in the user information total library comprises the following steps:
determining information sub-libraries corresponding to the user information interaction layer, wherein the user information main library corresponds to a plurality of information sub-libraries;
and receiving and storing the second user information through the information sub-library.
2. The method for acquiring user information according to claim 1, wherein before the first user information is acquired, the method further comprises:
three first global variables are defined in the user information gallery:
defining a first variable, wherein the first variable is used for indicating user information acquired from a back-end container of an application;
defining a second variable, wherein the second variable is used for indicating user information acquired from a back-end interface of the application;
and defining a third variable, wherein the third variable is used for indicating target user information obtained after combining the user information obtained from the back-end container of the application and the user information obtained from the back-end interface of the application.
3. The method for acquiring the user information according to claim 2, wherein after defining the third variable, the method comprises:
acquiring user information acquired from a back-end container and user information acquired from a back-end interface, wherein the user information and the user information belong to the same front-end page;
and combining the user information acquired from the back-end container and the user information acquired from the back-end interface, which belong to the same front-end page, to obtain a plurality of target user information.
4. The method of claim 1, wherein prior to receiving and storing the second user information via the information repository, the method further comprises:
and defining a plurality of second global variables in the information sub-base, wherein each second global variable is used for indicating each piece of data corresponding to the second user information.
5. The method for acquiring user information according to claim 1, wherein after receiving and saving the second user information through the information repository, the method further comprises:
acquiring page frame information corresponding to the information sub-database;
and displaying the second user information on the frame indicated by the page frame information.
6. An apparatus for acquiring user information, comprising:
the first acquisition module is used for acquiring first user information and storing the first user information in a user information general library, wherein the first user information comprises at least one of the following: user information acquired from a back-end container of an application and user information acquired from a back-end interface of the application;
the second acquisition module is configured to receive request information from a user information interaction layer through the user information total library, and acquire second user information corresponding to the request information from first user information stored in the user information total library, where the user information interaction layer has a one-to-one correspondence with a front page, and the second acquisition module is further configured to:
determining information sub-libraries corresponding to the user information interaction layer, wherein the user information main library corresponds to a plurality of information sub-libraries;
and receiving and storing the second user information through the information sub-library.
7. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run performs the method of any of the preceding claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 5 by means of the computer program.
CN202110358367.0A 2021-04-01 2021-04-01 User information acquisition method and device, storage medium and electronic device Active CN113157786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110358367.0A CN113157786B (en) 2021-04-01 2021-04-01 User information acquisition method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110358367.0A CN113157786B (en) 2021-04-01 2021-04-01 User information acquisition method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113157786A CN113157786A (en) 2021-07-23
CN113157786B true CN113157786B (en) 2023-06-09

Family

ID=76886181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110358367.0A Active CN113157786B (en) 2021-04-01 2021-04-01 User information acquisition method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113157786B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9342908B2 (en) * 2012-10-08 2016-05-17 Auckland Uniservices Limited Information retrieval and presentation methods and systems
CN109426597B (en) * 2017-12-21 2022-04-12 中国平安人寿保险股份有限公司 Application performance monitoring method, device, equipment, system and storage medium
CN112181644B (en) * 2020-09-21 2021-08-06 上海微亿智造科技有限公司 Method, system and device for cross-domain machine learning component Jupitter

Also Published As

Publication number Publication date
CN113157786A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN108255847B (en) Page generation method and device
CN105451087A (en) Pushing method, terminals, historical data server and system for barrage information
CN110795697B (en) Method and device for acquiring logic expression, storage medium and electronic device
CN104731869B (en) The page shows method and device
CN110222288B (en) Page display method, device and storage medium
CN104699488A (en) Method, equipment and system for acquiring APP (application) interface control data dynamically
CN105808642B (en) Recommendation method and device
CN108549586B (en) Information processing method and device
CN111813685A (en) Automatic testing method and device
CN111177243B (en) Data export method and device, storage medium and electronic device
CN112488270A (en) Two-dimensional code generation method and device
CN111597107A (en) Information output method and device and electronic equipment
CN108062401B (en) Application recommendation method and device and storage medium
CN113157786B (en) User information acquisition method and device, storage medium and electronic device
CN112214701A (en) Page display method and system, storage medium and electronic device
CN113190565B (en) Data updating method and device, storage medium and electronic device
CN110941711A (en) Electronic search report acquisition method and apparatus, storage medium, and electronic apparatus
CN111259287B (en) Page content display method and device, electronic equipment and storage medium
CN114579506A (en) Inter-processor communication method, system, storage medium, and processor
CN113434228A (en) Page request method and device, storage medium and electronic device
CN102855262B (en) Method and device for processing flash data
CN111125501B (en) Method and device for processing information
CN107038170B (en) Method and device for recommending application program
CN111831348B (en) Method and device for automatically configuring application and terminal equipment
CN111523295B (en) Data rendering method, device, medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant