CN115495781A - Method and device for generating function page for demonstration, electronic equipment and storage medium - Google Patents

Method and device for generating function page for demonstration, electronic equipment and storage medium Download PDF

Info

Publication number
CN115495781A
CN115495781A CN202211123301.4A CN202211123301A CN115495781A CN 115495781 A CN115495781 A CN 115495781A CN 202211123301 A CN202211123301 A CN 202211123301A CN 115495781 A CN115495781 A CN 115495781A
Authority
CN
China
Prior art keywords
demonstration
function page
data
function
exemplary
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
CN202211123301.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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211123301.4A priority Critical patent/CN115495781A/en
Publication of CN115495781A publication Critical patent/CN115495781A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a generation method, an apparatus, an electronic device and a storage medium of a demonstration function page, wherein the method comprises the following steps: acquiring a demonstration function page acquisition instruction for a target function, and acquiring non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction; carrying out data desensitization processing on the non-demonstration functional page data to obtain demonstration functional page data; and obtaining the demonstration function page of the target function according to the demonstration function page data. According to the method, the data desensitization processing is carried out on the non-demonstration function page data of any function, so that the demonstration function page of the function is obtained, time and labor are saved, the demonstration function page data are obtained non-randomly, and the credibility is good.

Description

Method and device for generating demonstration function page, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for generating a function page for demonstration, an electronic device, and a storage medium.
Background
This section is intended to provide a background or context to the embodiments of the disclosure recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Software, websites, system platforms and the like are composed of different functions, a function page refers to a page realizing a certain function, and the function page focuses on page contents of elements such as a certain function, but not characters or pictures.
In the development of functions, generally, one function can be used for adapting to a plurality of projects and providing services for the plurality of projects, the function needs to be shown before accessing one project, but data of the existing project cannot be adopted during the showing, and information leakage risks exist, in this case, the function is required to be shown through a demonstration function page.
However, because of the large difference between different functions, each time a function is developed, it is necessary to configure its dedicated demonstration function page for the function, which is time-consuming and labor-consuming.
Disclosure of Invention
In view of the above, an object of the present disclosure is to provide a method, an apparatus, an electronic device and a storage medium for generating a demonstration function page, which at least solve one of the technical problems in the related art to a certain extent.
Based on the above purpose, an exemplary embodiment of the present disclosure provides a method for generating a function page for demonstration, including:
acquiring a demonstration function page acquisition instruction for a target function, and acquiring non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction;
carrying out data desensitization processing on the non-demonstration functional page data to obtain demonstration functional page data;
and obtaining the demonstration function page of the target function according to the demonstration function page data.
Based on the same inventive concept, the exemplary embodiments of the present disclosure further provide an apparatus for generating a function page for demonstration, including:
the non-demonstration function page data acquisition module is configured to acquire a demonstration function page acquisition instruction for a target function and acquire non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction;
the data desensitization module is configured to perform data desensitization processing on the non-demonstration function page data to obtain demonstration function page data;
and the demonstration function page generating module is configured to obtain the demonstration function page of the target function according to the demonstration function page data.
Based on the same inventive concept, the exemplary embodiments of the present disclosure also provide an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method as described in any one of the above is implemented.
Based on the same inventive concept, the disclosed exemplary embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in any one of the above.
As can be seen from the foregoing, the exemplary function page generation method, apparatus, electronic device and storage medium provided in the embodiments of the present disclosure include: acquiring a demonstration function page acquisition instruction for a target function, and acquiring non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction; performing data desensitization processing on the non-demonstration function page data to obtain demonstration function page data; and obtaining the demonstration function page of the target function according to the demonstration function page data. According to the method, the data desensitization processing is carried out on the non-demonstration function page data of any function, so that the demonstration function page of the function is obtained, time and labor are saved, the demonstration function page data are obtained non-randomly, and the credibility is good.
Drawings
In order to clearly illustrate the technical solutions of the present disclosure or related technologies, the drawings used in the embodiments or related technologies description will be briefly introduced below, and obviously, the drawings in the following description are only embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of an application scenario of a method for generating an exemplary function page according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for generating an exemplary function page according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an exemplary function page generation apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more clearly apparent, the principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It is understood that these embodiments are presented merely to enable those skilled in the art to better understand and to practice the disclosure, and are not intended to limit the scope of the disclosure in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In this document, it is to be understood that any number of elements in the figures are provided by way of illustration and not limitation, and any nomenclature is used for differentiation only and not in any limiting sense.
The principles and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
As described in the background section, a function page refers to a page that implements a certain function, and in the development of a function, in general, one function may be used to adapt to multiple projects and provide services for the multiple projects, and before accessing one project, the function needs to be presented, but in the presentation, data of an existing project cannot be used, which has a risk of information leakage, and in this case, the function page needs to be presented through demonstration.
However, because of the large difference between different functions, each function is developed, and a dedicated demonstration function page needs to be configured for the function, which is time-consuming and labor-consuming.
The inventor of the present disclosure has found that, in the automatic generation scheme of the demonstration function page in the related art, data in the demonstration function page usually adopts characters without actual meaning (for example, common "XX") or adopts random numbers to replace real data, which saves cost, but characters without actual meaning and random numbers have low credibility and cannot well embody the function of the function page. Therefore, in order to improve the credibility of the function page for demonstration, a scheme of manually designing and drawing values is usually adopted to generate the function page for demonstration, however, such function page for demonstration is usually static (i.e. its values are fixed and do not change), cannot interact with the user, and if it is necessary to implement the update, it is usually necessary to redesign the values and draw, and its maintenance cost is high.
In order to solve the above problem, the present disclosure provides a generation scheme of a function page for demonstration, which specifically includes: acquiring a demonstration function page acquisition instruction for a target function, and acquiring non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction; performing data desensitization processing on the non-demonstration function page data to obtain demonstration function page data; and obtaining the demonstration function page of the target function according to the demonstration function page data. According to the method, the data desensitization processing is carried out on the non-demonstration function page data of any function, so that the demonstration function page of the function is obtained, time and labor are saved, the demonstration function page data are obtained non-randomly, and the credibility is good.
Having described the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
Referring to fig. 1, it is a schematic view of an application scenario of a generation method of an exemplary function page provided in an embodiment of the present disclosure. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. The terminal device 101, the server 102 and the data storage system 103 may be connected through a wired or wireless communication network. The terminal device 101 includes, but is not limited to, a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a Personal Digital Assistant (PDA), or other electronic devices capable of implementing the above functions. The server 102 and the data storage system 103 may be independent physical servers, may also be a server cluster or distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms.
The server 102 is configured to provide a generation service of a demonstration function page for a user of the terminal device 101, the terminal device 101 is installed with a client communicating with the server 102, the user can input a demonstration function page acquisition instruction for a target function through the client, for example, click a virtual key of the target function, the client sends the demonstration function page acquisition instruction for the target function to the server 102, and the server 102 acquires non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction; performing data desensitization processing on the non-demonstration function page data to obtain demonstration function page data; and obtaining a demonstration function page of the target function according to the demonstration function page data, sending the demonstration function page to the client, and displaying the demonstration function page to the user by the client to help the user to know the target function.
A non-exemplary function page database is maintained in data storage system 103 and includes data pairs consisting of exemplary function page fetch instructions and non-exemplary function page data. The server 102 provides the generation service of the exemplary function page to the user based on the non-exemplary function page database.
An exemplary generation scheme of a function page according to an exemplary embodiment of the present disclosure is described below in conjunction with the application scenario of fig. 1. It should be noted that the above application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. Rather, embodiments of the present disclosure may be applied to any scenario where applicable.
Referring to fig. 2, it is a schematic flowchart of a method for generating an exemplary function page according to an embodiment of the present disclosure.
The method for generating the demonstration function page comprises the following steps:
step S210, obtaining a demonstration function page obtaining instruction for the target function, and obtaining non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page obtaining instruction.
In some exemplary embodiments, the non-exemplary function page database includes data pairs consisting of exemplary function page fetch instructions and non-exemplary function page data.
In some exemplary embodiments, a method for constructing a non-exemplary function page database includes:
acquiring a non-exemplary function page acquisition instruction for any function and the non-exemplary function page data corresponding to the non-exemplary function page acquisition instruction;
constructing an exemplary function page acquisition instruction for the function according to the non-exemplary function page acquisition instruction for the function;
storing a data pair consisting of the exemplary function page fetch instruction and the non-exemplary function page data in the non-exemplary function page database.
In some exemplary embodiments, the non-exemplary function page fetch instruction includes a uniform resource identifier;
the constructing of the exemplary function page fetching instruction for the function according to the non-exemplary function page fetching instruction for the function comprises:
and replacing a first preset character which represents that the type of the acquisition instruction is a non-demonstration function page acquisition instruction in the uniform resource identifier with a second preset character which represents that the type of the acquisition instruction is a demonstration function page acquisition instruction.
As an example, a Uniform Resource Identifier (URI) of a non-exemplary function page get instruction (i.e., a real service instruction) sent to a container (the container is an interface set between a component and a platform in an application server) is intercepted, and is stored separately as a variable, and/api information (i.e., a first preset character representing that the get instruction type is the non-exemplary function page get instruction) in the variable is replaced by/demo-api information (i.e., a second preset character representing that the get instruction type is the exemplary function page get instruction), and the operation does not change the URI of the non-exemplary function page get instruction. And continuing to execute the non-exemplary function page acquisition instruction, acquiring an execution result of the instruction, and storing a data pair consisting of the previously stored variable and the execution result into a non-exemplary function page database.
The non-exemplary function page database is used for storing the request URI and the data obtained by executing the request URI of each service interface (optionally, the data may be executed for the first time). The non-exemplary function page database comprises a table of data and an updating and querying interface of the table, wherein the table comprises the following parts: the URI of the service request and the return data of the service interface.
As an example, this is done by inheriting the Filter class and rewriting the doFilter method. When the container is started, all uri with demo interface is taken out from the database and stored in a static set in the memory. When a container receives a normal service request, a system acquires uri of the request through a servletRequest object in a doFilter method, then compares whether the uri exists in a static set, if the uri does not exist, an interface returns data to a database, and if the uri does not exist, the interface execution data is acquired by the system in a mode that an execution result is acquired from servletRequest after filter in a filter is executed; if the business logic exists, only the business logic is continuously executed, and the operation of the database is not executed.
And step S220, carrying out data desensitization processing on the non-demonstration function page data to obtain demonstration function page data.
In some exemplary embodiments, before performing data desensitization processing on the non-exemplary functional page data to obtain exemplary functional page data, the method further includes:
and traversing the non-exemplary functional page data through a recursive algorithm to divide the non-exemplary functional page data into time-series data and non-time-series data.
In some exemplary embodiments, before traversing the non-exemplary functional page data through a recursive algorithm, the method further comprises:
and dividing the non-exemplary function page data into an array and an object according to preset symbols in the non-exemplary function page data.
In some exemplary embodiments, said traversing said non-exemplary functional page data by a recursive algorithm comprises:
in response to determining that the non-exemplary function page data is an array, traversing each element in the array and performing a recursive operation on each element;
in response to determining that the non-exemplary functional page data is an object, traversing each key-value pair, performing a recursive operation on each key-value pair, and performing a recursive operation on values in the key-value pair;
in response to determining that the non-exemplary functional page data is not an array and is not an object, no recursive operation is performed.
In some exemplary embodiments, the non-exemplary function page data is the time series data;
the desensitizing processing of the data of the non-demonstration function page to obtain demonstration function page data comprises:
in response to determining that the key in the object is a timestamp, updating the time series data according to a user selected time range and the timestamp in the object;
in response to determining that the element in the array is a timestamp, updating the time series data according to a user selected time range and the timestamp in the array;
in response to determining that the value in the object is a timestamp, a timestamp is randomly generated within a user-selected time range.
In some exemplary embodiments, the non-exemplary function page data is the non-time series data;
the desensitizing processing of the data of the non-demonstration function page to obtain demonstration function page data comprises:
determining an index of an array or a key of an object, multiplying a value of the non-exemplary function page data which is not the array and is not the object by a random number within a preset range to obtain a processed value in response to determining that the value is a numerical type, and putting the processed value into the array or the object.
As one example, the system uses a recursive algorithm to traverse all fields in the data, checking if there is time-formatted data. The data returned to the front end by the back end interface is generally data in a json format, and the data in the json format has two forms, namely arrays and objects. Arrays of the Json format are represented using square brackets "[ ]", and Json objects are represented using braces "{ }". The system judges whether the current layer is an object or an array according to the bracket format of the returned data, and continues to execute different recursive logics according to the json object, the json array or the common element after the judgment is finished.
If the current layer is a json array, traversing each element in the array, and performing recursive operation on each element;
if the current layer is a json object, each key-value pair is traversed in a loop since the json object is in key-value format. Meanwhile, as can be seen from the syntax of json, value may also be a json object, json array or a common element, so that recursion continues to be performed on value.
If the current layer is a normal element, i.e., the first and last two characters in the format of value are neither brackets nor braces at the same time, the recursion is aborted.
Recursive algorithms process data in a common format. The recursive algorithm records the current index of the traversed array or the current key of the traversed object, when a value is traversed to be a common element, whether the element is a numerical value type is judged, if the value is the numerical value type, the numerical value is multiplied by a random number of 0.8-1.2, then the processed value is set into the original json object or json array, and the operation is synchronously carried out during the recursive traversal.
Recursive algorithms process data in a time series format. The front-end and back-end interactions in this disclosure use a millisecond timestamp format in unison. For data in the Json format in a service, the timestamp is stored in the following three positions: each element in key in json object, value in json object and json array has special processing logic for the timestamps of the three positions during recursion and traversal, and the following description is respectively given:
the key in the Json object is a timestamp. When each step of recursion is executed, if the current layer is an object, the system judges whether each key in the object is a time stamp (namely a 13-bit long integer number) of millisecond level, if so, the system acquires a query time range parameter (two parameters of starting time and ending time) selected by a user, firstly calculates the number of keys in the original json object and the interval time of each key after the time stamps are sequenced, and then reversely generates a new key value sequence by using the number parameter and the interval time parameter of the keys according to the starting time selected by the user. The number of keys and time intervals in the new sequence of key values and the number of ordered keys and time interval structure are consistent, except that the time range is changed to the time selected by the user. And after a new key value sequence is generated, the key values are respectively updated to the original json objects.
The elements in the Json array are time stamps. In this case, the processing manner of each element in the json array is the same as that of the key value sequence in the previous paragraph. I.e. a new time series is generated based on the user selected time range and the timestamp structure in the original array.
Value in Json object is a timestamp. A time stamp is randomly generated within a user selected time range.
In the present disclosure, the demonstration function page and the non-demonstration function page (i.e., the real function page) use the same set of front and back ends, and the difference between them is that the data displayed by the demonstration function page is data with desensitized result data, not real data.
As an example, in some scenarios, the permissions of different users are different, and under the same function page, a user with permission can normally view the function page, and click a yes/api request sent by the front end to the container during operation; a user without service authority can only view a function page for demonstration, a front end sends a demo-api request to a container when clicking operation, a system intercepts the demo-api request, an interface request does not trigger the original service execution logic, the interface request is executed to get the returned data from a database according to a URI after interception, and then desensitization processing is carried out on the data; if the time sequence exists in the data, the time sequence is also subjected to adaptation processing. And after the processing is finished, the data of the demonstration function page is returned to the front end, and the user sees the demonstration function page after the desensitization processing and the time adaptation processing.
Step S230, obtaining the demonstration function page of the target function according to the demonstration function page data.
In some exemplary embodiments, said obtaining said demonstration function page of said target function according to said demonstration function page data includes:
and recombining the demonstration function page data to an interface corresponding to the target function to obtain the demonstration function page.
In some exemplary embodiments, the interface is a container. The container is an interface set between the component and the platform in the application server, the container is generally located in the application server, the application server is responsible for loading and maintaining, one container can only exist in one application server, and one application server can establish and maintain a plurality of containers.
As can be seen from the foregoing, the method for generating an exemplary function page provided in the embodiment of the present disclosure includes: acquiring a demonstration function page acquisition instruction for a target function, and acquiring non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction; carrying out data desensitization processing on the non-demonstration functional page data to obtain demonstration functional page data; and obtaining the demonstration function page of the target function according to the demonstration function page data. According to the method, the function page for demonstration of any function is obtained by performing data desensitization processing on the function page data for non-demonstration of the function, time and labor are saved, and the function page data for demonstration are obtained non-randomly and have better credibility.
Further, in the present disclosure, when a service interface is newly added, function page data for demonstration and interface configuration information are automatically generated; when the front end requests a common service interface, normal service processing logic is carried out, and when the demonstration function page interface is carried out, only the demonstration function page processing logic is carried out, and the mutual calling of the common service logic is not involved in the demonstration function page processing logic; a dedicated data desensitization algorithm is executed when requesting the demonstration function page interface.
The method and the device realize a set of demonstration function page implementation scheme with good universality, can automatically generate demonstration function page data after a first request when a new service interface is added, do not need manual addition, and have strong universality. All logic related to the demonstration function page is written in a set of universal templates, if the related logic needs to be changed, only the templates need to be changed, service interfaces do not need to be changed, and therefore the method and the system are very convenient to maintain, convenient to maintain and low in maintenance cost.
It should be noted that the method of the embodiment of the present disclosure may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the devices may interact with each other to complete the method.
It should be noted that the above describes some embodiments of the disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, corresponding to the method of any embodiment, the disclosure also provides a generation device of a demonstration function page.
Referring to fig. 3, the exemplary function page generation apparatus includes:
a non-demonstration function page data acquisition module 310 configured to acquire a demonstration function page acquisition instruction for a target function, and acquire non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction;
the data desensitization module 320 is configured to perform data desensitization processing on the non-demonstration function page data to obtain demonstration function page data;
a demonstration function page generating module 330 configured to obtain the demonstration function page of the target function according to the demonstration function page data.
In some exemplary embodiments, the non-exemplary function page data obtaining module 310 is further configured to:
acquiring a non-exemplary function page acquisition instruction for any function and the non-exemplary function page data corresponding to the non-exemplary function page acquisition instruction;
constructing a demonstration function page acquisition instruction for the function according to the non-demonstration function page acquisition instruction for the function;
storing a data pair consisting of the demonstration function page fetch instruction and the non-demonstration function page data in the non-demonstration function page database.
In some exemplary embodiments, the non-exemplary function page fetch instruction includes a uniform resource identifier; the non-exemplary function page data obtaining module 310 is specifically configured to:
and replacing a first preset character which represents that the type of the acquisition instruction is a non-demonstration function page acquisition instruction in the uniform resource identifier with a second preset character which represents that the type of the acquisition instruction is a demonstration function page acquisition instruction.
In some exemplary embodiments, before performing the data desensitization process on the non-exemplary functional page data to obtain exemplary functional page data, the data desensitization module 320 is further configured to:
and traversing the non-exemplary functional page data through a recursive algorithm to divide the non-exemplary functional page data into time-series data and non-time-series data.
In some exemplary embodiments, before traversing the non-exemplary functional page data through the recursive algorithm, the data desensitization module 320 is further configured to:
and dividing the non-exemplary function page data into an array and an object according to preset symbols in the non-exemplary function page data.
In some exemplary embodiments, the data desensitization module 320 is specifically configured to:
in response to determining that the non-exemplary function page data is an array, traversing each element in the array and performing a recursive operation on each element;
in response to determining that the non-exemplary function page data is an object, traversing each key-value pair, performing a recursive operation on each key-value pair, and performing a recursive operation on values in the key-value pairs;
in response to determining that the non-exemplary functional page data is not an array and is not an object, no recursive operation is performed.
In some exemplary embodiments, the non-exemplary function page data is the time series data; the data desensitization module 320 is specifically configured to:
in response to determining that the key in the object is a timestamp, updating the time series data according to a user selected time range and the timestamp in the object;
in response to determining that an element in the array is a timestamp, updating the time series data according to a user selected time range and the timestamp in the array;
in response to determining that the value in the object is a timestamp, the timestamp is randomly generated within a user-selected time range.
In some exemplary embodiments, the non-exemplary function page data is the non-time series data; the data desensitization module 320 is specifically configured to:
determining an index of an array or a key of an object, multiplying a value of the non-exemplary function page data which is not the array and is not the object by a random number within a preset range to obtain a processed value in response to determining that the value is a numerical type, and putting the processed value into the array or the object.
In some exemplary embodiments, the exemplary function page generating module 330 is specifically configured to:
and recombining the demonstration function page data to an interface corresponding to the target function to obtain the demonstration function page.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations of the present disclosure.
The apparatus of the foregoing embodiment is used to implement the method for generating the corresponding demonstration function page in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above embodiments, the present disclosure further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the exemplary function page generation method described in any of the above embodiments is implemented.
Fig. 4 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called by the processor 1010 for execution.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The input/output module may be configured as a component within the device (not shown) or may be external to the device to provide corresponding functionality. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
The bus 1050 includes a path to transfer information between various components of the device, such as the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only the components necessary to implement the embodiments of the present disclosure, and need not include all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the method for generating the corresponding demonstration function page in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the exemplary function page generation method according to any one of the above embodiments, corresponding to any one of the above embodiment methods.
The non-transitory computer readable storage medium may be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid State Disks (SSDs)), etc.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the exemplary function page generation method described in any embodiment of the foregoing exemplary method portion, and have the beneficial effects of the corresponding method embodiment, which are not described again here.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be embodied as a system, method or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.) or a combination of hardware and software, and is referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the present disclosure may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied therein.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive example) of the computer readable storage medium may include, for example: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instruction means which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
Further, while the operations of the disclosed methods are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
It is to be noted that technical terms or scientific terms used in the embodiments of the present disclosure should have a general meaning as understood by one having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
While the spirit and principles of the present disclosure have been described with reference to several particular embodiments, it is to be understood that the present disclosure is not limited to the particular embodiments disclosed, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims (12)

1. A method for generating a function page for demonstration, comprising:
acquiring a demonstration function page acquisition instruction for a target function, and acquiring non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction;
performing data desensitization processing on the non-demonstration function page data to obtain demonstration function page data;
and obtaining the demonstration function page of the target function according to the demonstration function page data.
2. The method of claim 1, further comprising:
acquiring a non-exemplary function page acquisition instruction for any function and the non-exemplary function page data corresponding to the non-exemplary function page acquisition instruction;
constructing an exemplary function page acquisition instruction for the function according to the non-exemplary function page acquisition instruction for the function;
storing a data pair consisting of the exemplary function page fetch instruction and the non-exemplary function page data in the non-exemplary function page database.
3. The method of claim 2, wherein said non-exemplary function page fetch instruction includes a uniform resource identifier;
the constructing of the exemplary function page fetch instruction for the function according to the non-exemplary function page fetch instruction for the function includes:
replacing a first preset character which is used for representing that the type of the acquisition instruction is a non-demonstration-purpose functional page acquisition instruction in the uniform resource identifiers with a second preset character which is used for representing that the type of the acquisition instruction is a demonstration-purpose functional page acquisition instruction.
4. The method according to claim 1, wherein before performing data desensitization processing on said non-demonstration functional page data to obtain demonstration functional page data, said method further comprises:
the non-exemplary functional page data is partitioned into time series data and non-time series data by traversing the non-exemplary functional page data through a recursive algorithm.
5. The method of claim 4, wherein prior to traversing the non-exemplary functional page data through a recursive algorithm, the method further comprises:
and dividing the non-exemplary function page data into an array and an object according to preset symbols in the non-exemplary function page data.
6. The method of claim 5, wherein said traversing said non-exemplary functional page data through a recursive algorithm comprises:
in response to determining that the non-exemplary function page data is an array, traversing each element in the array and performing a recursive operation on each element;
in response to determining that the non-exemplary function page data is an object, traversing each key-value pair, performing a recursive operation on each key-value pair, and performing a recursive operation on values in the key-value pairs;
in response to determining that the non-exemplary function page data is not an array and is not an object, no recursive operation is performed.
7. The method of claim 6, wherein the non-exemplary function page data is the time series data;
the desensitizing processing of the data of the non-demonstration function page to obtain demonstration function page data comprises:
in response to determining that the key in the object is a timestamp, updating the time series data according to a user selected time range and the timestamp in the object;
in response to determining that an element in the array is a timestamp, updating the time series data according to a user selected time range and the timestamp in the array;
in response to determining that the value in the object is a timestamp, a timestamp is randomly generated within a user-selected time range.
8. The method according to claim 6, wherein said non-exemplary function page data is said non-time series data;
the performing data desensitization processing on the non-demonstration-purpose functional page data to obtain demonstration-purpose functional page data includes:
determining an index of an array or a key of an object, multiplying a value of the non-exemplary function page data which is not the array and is not the object by a random number within a preset range in response to determining that the value is a numerical type, obtaining a processed value, and putting the processed value into the array or the object.
9. The method as claimed in claim 1, wherein said obtaining said demonstration function page of said target function according to said demonstration function page data comprises:
and recombining the demonstration function page data to an interface corresponding to the target function to obtain the demonstration function page.
10. An apparatus for generating a function page for demonstration, comprising:
the non-demonstration function page data acquisition module is configured to acquire a demonstration function page acquisition instruction for a target function and acquire non-demonstration function page data from a pre-constructed non-demonstration function page database according to the demonstration function page acquisition instruction;
the data desensitization module is configured to perform data desensitization processing on the non-demonstration functional page data to obtain demonstration functional page data;
and the demonstration function page generating module is configured to obtain the demonstration function page of the target function according to the demonstration function page data.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 9 when the program is executed by the processor.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 9.
CN202211123301.4A 2022-09-15 2022-09-15 Method and device for generating function page for demonstration, electronic equipment and storage medium Pending CN115495781A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211123301.4A CN115495781A (en) 2022-09-15 2022-09-15 Method and device for generating function page for demonstration, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211123301.4A CN115495781A (en) 2022-09-15 2022-09-15 Method and device for generating function page for demonstration, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115495781A true CN115495781A (en) 2022-12-20

Family

ID=84468783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211123301.4A Pending CN115495781A (en) 2022-09-15 2022-09-15 Method and device for generating function page for demonstration, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115495781A (en)

Similar Documents

Publication Publication Date Title
US11431753B2 (en) Network-based permissioning system
US11106816B2 (en) Database public interface
US10169417B2 (en) Detecting logical relationships based on structured query statements
US9703834B2 (en) Topological query in multi-tenancy environment
US20170161511A1 (en) Database public interface
US11580294B2 (en) Techniques for web framework detection
US11334601B2 (en) Unified data model
CN108255967B (en) Method and device for calling storage process, storage medium and terminal
CN105550164A (en) Chart generation method and device
US9465658B1 (en) Task distribution over a heterogeneous environment through task and consumer categories
CN115495781A (en) Method and device for generating function page for demonstration, electronic equipment and storage medium
CN115292313A (en) Pseudo-column implementation method and device, electronic equipment and storage medium
US11029980B2 (en) Customizable animations
US11301498B2 (en) Multi-cloud object store access
CN113722007A (en) Configuration method, device and system of VPN branch equipment
US10592809B2 (en) Guided row insertion
CN115438113A (en) Parameter management method and device, electronic equipment and storage medium
CN114218590A (en) Authority configuration method, device, equipment and medium
CN115328537A (en) Version management method of configuration management system and configuration version management system
CN115795437A (en) Data processing method and device, terminal equipment and computer readable storage medium
CN117272374A (en) Authority control method and related equipment
CN114942959A (en) Data calling method, data calling device, electronic equipment and storage medium
CN113760863A (en) Database configuration method and device, computer equipment and readable storage medium
CN115618325A (en) Authority management method, device, equipment and storage medium
CN116821438A (en) Database-based data processing method, device, medium and 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