CN111625274A - Page dependence determination method and device, electronic equipment and storage medium - Google Patents

Page dependence determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111625274A
CN111625274A CN202010456592.3A CN202010456592A CN111625274A CN 111625274 A CN111625274 A CN 111625274A CN 202010456592 A CN202010456592 A CN 202010456592A CN 111625274 A CN111625274 A CN 111625274A
Authority
CN
China
Prior art keywords
page
name
global variable
attribute
client
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.)
Granted
Application number
CN202010456592.3A
Other languages
Chinese (zh)
Other versions
CN111625274B (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010456592.3A priority Critical patent/CN111625274B/en
Priority claimed from CN202010456592.3A external-priority patent/CN111625274B/en
Publication of CN111625274A publication Critical patent/CN111625274A/en
Application granted granted Critical
Publication of CN111625274B publication Critical patent/CN111625274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The disclosure relates to a page dependency determination method, a page dependency determination device, an electronic device and a storage medium, wherein the method comprises the following steps: creating an instance in a page; when a page calls a method in a global variable, calling the method in the global variable through an instance, and recording the name of the called method; and outputting the name of the recorded method, so that other clients can determine the method on which the page is communicated with the client according to the name, and deploying the page at other clients according to the determined method. According to the embodiment of the disclosure, when a method in a global variable is called by an instance on a page, a proxy calls the method in the global variable, records the name of the called method, and then outputs the recorded name of the method. When the page needs to be deployed to other clients, the other clients can quickly and comprehensively determine the method in the global variable on which the page depends according to the name of the output method, so that the configuration is adjusted to be adaptive to the method in the global variable on which the page depends.

Description

Page dependence determination method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of web pages, and in particular, to a method and an apparatus for determining page dependency, an electronic device, and a storage medium.
Background
In the related art, a client may inject a global variable for an H5 page, that is, an HTML (HyperText Markup Language) 5 page, where the global variable includes various methods for the H5 page to call, and the H5 page may communicate with the client by calling a method in the global variable, where the method in the global variable is also referred to as bridge, which indicates that the method in the global variable may serve as a bridge between the H5 page and the client.
In order to expand the application scenario of the H5 page, the H5 page needs to be deployed to other clients, but a method in the global variable on which the H5 page depends is injected by a certain client, and other clients may not have a configuration suitable for the method in the global variable on which the H5 page depends.
At present, in order to enable other clients to have configurations suitable for methods in global variables depended on by H5 pages, complicated analysis needs to be performed on the methods in the global variables depended on by H5 pages, and even a client injecting the global variables needs to assist, so that the process is complicated.
Disclosure of Invention
The present disclosure provides a page dependency determination method, apparatus, electronic device, and storage medium to at least solve the technical problems in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for determining page dependency is provided, including:
creating an instance in a page, wherein the page is injected with a global variable by a client, the global variable comprises at least one method, and the page communicates with the client by calling the method in the global variable;
when the page calls the method in the global variable, calling the method in the global variable through the instance, and recording the name of the called method;
and outputting the name of the recorded method, so that other clients can determine the method on which the page and the client communicate according to the name, and deploying the page at the other clients according to the determined method.
Optionally, the method further comprises:
recording the attribute of the input parameter and the attribute of the output parameter of the called method;
and outputting the attribute of the input parameter and the attribute of the output parameter, so that the other clients determine a method on which the page and the client communicate according to the attribute of the input parameter, the attribute of the output parameter and the name, and deploy the page on the other clients according to the determined method.
Optionally, the attribute of the input parameter and/or the attribute of the output parameter comprises at least one of:
data type, data structure.
Optionally, the name of the method of outputting the record includes:
and outputting the name of the recorded method when the recording duration for recording the name of the called method is longer than the preset duration.
Optionally, the name of the method of outputting the record includes:
and outputting the name of the recorded method when the recording times of recording the name of the called method is more than the preset times.
According to a second aspect of the embodiments of the present disclosure, there is provided a page dependency determining apparatus, including:
an instance creation module configured to perform creation of an instance in a page, wherein the page is injected with a global variable by a client, the global variable containing at least one method, and the page communicates with the client by calling the method in the global variable;
the instance proxy module is configured to execute that when the page calls the method in the global variable, the method in the global variable is called through the instance, and the name of the called method is recorded;
and the output module is configured to execute the name of the method for outputting the record, so that other clients can determine the method on which the page is communicated with the client according to the name and deploy the page at the other clients according to the determined method.
Optionally, the instance agent module is further configured to record attributes of input parameters and attributes of output parameters of the called method;
the output module is further configured to output the attribute of the input parameter and the attribute of the output parameter, so that the other clients determine a method on which the page depends for communication with the client according to the attribute of the input parameter, the attribute of the output parameter and the name, and deploy the page at the other clients according to the determined method.
Optionally, the attribute of the input parameter and/or the attribute of the output parameter comprises at least one of:
data type, data structure.
Optionally, the output module is configured to output the name of the recorded method when a recording duration for recording the name of the called method is greater than a preset duration.
Optionally, the output module is configured to output the name of the recorded method when the number of times of recording the name of the called method is greater than a preset number of times.
According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page dependency determination method as described in any of the above embodiments.
According to a fourth aspect of the embodiments of the present disclosure, a storage medium is provided, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform the page dependency determination method according to any one of the embodiments described above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product configured to execute the page dependency determination method of any one of the above embodiments.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the embodiment of the disclosure, when a method in a global variable is called by an instance on a page, a proxy calls the method in the global variable, records the name of the called method, and then outputs the recorded name of the method. When a page needs to be deployed to other clients, even if the other clients do not have the configuration suitable for the method in the global variable on which the page depends, the method in the global variable on which the page depends can be quickly and comprehensively determined according to the name of the output method, so that the configuration is adjusted to be suitable for the method in the global variable on which the page depends.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a schematic flow chart diagram illustrating a page dependency determination method according to an embodiment of the present disclosure.
Fig. 2 is a schematic flow chart diagram illustrating another page dependency determination method according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram illustrating a page dependency determination method according to an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart diagram illustrating yet another page dependency determination method according to an embodiment of the present disclosure.
Fig. 5 is a schematic flow chart diagram illustrating yet another page dependency determination method according to an embodiment of the present disclosure.
Fig. 6 is a schematic block diagram illustrating a page dependency determination apparatus according to an embodiment of the present disclosure.
Fig. 7 is a schematic block diagram illustrating an electronic device in accordance with an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic flow chart diagram illustrating a page dependency determination method according to an embodiment of the present disclosure. The method shown in the embodiment can be applied to terminals, such as electronic devices, such as mobile phones, tablet computers, wearable devices, and the like. For example, the method is applicable to a client in a mobile phone.
As shown in fig. 1, the page dependency determining method includes:
in step S101, creating an instance in a page, wherein the page is injected with a global variable by a client, the global variable includes at least one method, and the page communicates with the client by calling the method in the global variable;
in step S102, when the page calls a method in the global variable, the method in the global variable is called by the instance, and a name of the called method is recorded;
in step S103, the name of the recorded method is output, so that other clients determine, according to the name, a method on which the page depends for communication with the client, and deploy the page at the other clients according to the determined method.
In one embodiment, the page may be an H5 page, and the H5 page may also be referred to as an H5 project, and the page is injected with a global variable by the client, the global variable contains at least one method, and the page communicates with the client by calling the method in the global variable, that is, the page communicates with the client by depending on the method in the global variable. The method in the global variable on which the page depends may be referred to as bridge, that is, bridge, and represents that the method in the global variable may serve as a bridge for the H5 page and the client to communicate.
In one embodiment, an instance may be created in a page, and this instance may serve as a manager for managing the invocation of methods in global variables by the page, and the name of the instance may be set as needed, for example, may be set as newBridge.
When the page calls a method in the global variable, the instance as the manager may proxy the call action, that is, call the method in the global variable through the instance, and record the name of the called method. Further, after recording the name of the called method, the name of the recorded method may be output.
The proxy method may be created in the instance, and the step S102 is implemented by the proxy method, for example, the proxy method is newBridge. method (funName), where the funName represents a name of a method called by the instance newBridge, for example, the page is a page in a client of a mobile phone, the funName may be bridge.
According to the embodiment of the disclosure, when a method in a global variable is called by an instance on a page, a proxy calls the method in the global variable, records the name of the called method, and then outputs the recorded name of the method. When a page needs to be deployed to other clients, even if the other clients do not have the configuration suitable for the method in the global variable on which the page depends, the method in the global variable on which the page and the client communicate can be quickly and comprehensively determined according to the name of the output method, so that the configuration is adjusted to be suitable for the method in the global variable on which the page depends.
For example, the page is injected with a global variable by the client a in the mobile phone, the method on which the page depends includes fun1, fun2, fun3, and fun4, fun1 may be bridge.
According to the embodiment of the present disclosure, when a page calls methods in fun1, fun2, fun3 and fun4, the names of the called methods may be recorded, so that the methods of fun1, fun2, fun3 and fun4, etc. of the page call are recorded, and the recorded method names are output. When a page needs to be deployed to the client B, according to the names of the methods, a user editing the client B can quickly and comprehensively determine that page-to-client communication depends on the methods such as fun1, fun2, fun3 and fun4 in global variables, so that the configuration of the client B can be adjusted to adapt to the methods such as fun1, fun2, fun3 and fun4, and the page can be successfully deployed to the client B.
Fig. 2 is a schematic flow chart diagram illustrating another page dependency determination method according to an embodiment of the present disclosure. As shown in fig. 2, the method further comprises:
in step S104, recording the attribute of the input parameter and the attribute of the output parameter of the called method;
in step S105, the attribute of the input parameter and the attribute of the output parameter are output, so that the other clients determine a method by which the page depends on communication with the client according to the attribute of the input parameter, the attribute of the output parameter, and the name, and deploy the page at the other clients according to the determined method.
It should be noted that the execution sequence of step S104 and step S105 may be set as needed, for example, step S104 may be executed when the name of the called method is recorded in step S102, or may be executed at other times, and step S105 may be executed synchronously with step S103, or may be executed asynchronously.
In one embodiment, on the basis of recording the name of the called method, the attribute of the input parameter and the attribute of the output parameter of the called method may also be recorded, wherein the output parameter refers to the parameter input into the called method, and the output parameter may also be referred to as a response parameter, which refers to the parameter returned to the page by the client based on the input parameter. Further, the attribute of the input parameter and the attribute of the output parameter may be output.
In general, the names of the same method are the same, but the attributes of the input parameters and the attributes of the output parameters of the same method may be different. In this embodiment, by further recording and outputting the attribute of the input parameter and the attribute of the output parameter of the called method, it can be ensured that the attribute of the input parameter and the attribute of the output parameter of the called method can be accurately and comprehensively determined, and further, when a page needs to be deployed to other clients, the attribute of the input parameter and the attribute of the output parameter of a method on which the page depends on communication with the clients can be quickly and comprehensively determined according to the attribute of the input parameter and the attribute of the output parameter, so that the configuration is adjusted to be adapted to the attribute of the input parameter and the attribute of the output parameter of the method on which the page depends.
For example, the created proxy method may be newBridge. method (data), where the funName represents the name of the method called by the instance newBridge, and the data represents the input parameter and the output parameter of the method called by the instance newBridge, and the method name, the input parameter and the output parameter recorded by the proxy method may be registered on one object, and then by analyzing the input parameter and the output parameter, the attribute of the input parameter and the attribute of the output parameter may be determined.
Optionally, the attribute of the input parameter and/or the attribute of the output parameter comprises at least one of:
data type, data structure.
The data type may refer to a parameter as a numeric value, or a character string, and the like, and the data structure may refer to which fields the parameter includes.
Fig. 3 is a schematic diagram illustrating a page dependency determination method according to an embodiment of the present disclosure.
As shown in FIG. 3, a client A can be edited at the client factory, wherein the client A can inject a global variable for the H5 page, the global variable comprises at least one method, and the H5 page communicates with the client A by calling the method in the global variable.
In this embodiment, an instance newBridge may be created in the H5 page as the manager of bridge. A method proxy method may be created in an instance. When a method in a global variable is called by the H5 page, the method in the global variable is called by a method proxy method in the example, and the name of the called method is recorded, and the attribute of the input parameter and the attribute of the output parameter of the called method are recorded. Further, the name of the recorded method, the attribute of the input parameter, and the attribute of the output parameter may be registered in a collection object, and then the name of the recorded method, the attribute of the input parameter, and the attribute of the output parameter may be output through the object.
When a user needs to deploy the H5 page to a client other than the client a, such as the client B, the client C, and the client D, even if other clients do not have a configuration in which the method, the attribute of the input parameter, and the attribute of the output parameter in the global variable on which the H5 page depends are adapted, the method, the attribute of the input parameter, and the attribute of the output parameter on which the page communicates with the client can be quickly and comprehensively determined according to the name of the output method, the attribute of the input parameter, and the attribute of the output parameter, so that the configuration is adjusted to be adapted to the method, the attribute of the input parameter, and the attribute of the output parameter on which the page depends, and smooth deployment of the page to the client B, the client C, and the client D is ensured.
Fig. 4 is a schematic flow chart diagram illustrating yet another page dependency determination method according to an embodiment of the present disclosure. As shown in fig. 4, the name of the method of outputting the record includes:
in step S1031, when a recording duration for recording the name of the called method is longer than a preset duration, the name of the recorded method is output.
In one embodiment, since the methods called may be different when the page communicates with the client, for example, calling method fun1 when the page communicates with the client based on a refresh operation, and calling fun2 when the page communicates based on a click operation, that is, the page may call different methods at different times, it may be difficult to ensure that the method on which the page communicates with the client is fully recorded in a short period of time.
Therefore, the name of the recorded method can be output when the recording duration for recording the name of the called method is longer than the preset duration, and the recording duration is longer and the recording times are more, so that all methods depending on the communication between the page and the client can be easily covered, the name of the method depending on the communication between the page and the client can be comprehensively recorded within the recording duration, and the name of the output method is comprehensive.
Fig. 5 is a schematic flow chart diagram illustrating yet another page dependency determination method according to an embodiment of the present disclosure. As shown in fig. 5, the name of the method of outputting the record includes:
in step S1032, when the number of times of recording the name of the called method is greater than the preset number of times, the name of the recorded method is output.
In one embodiment, since the methods called may be different when the page communicates with the client, for example, calling method fun1 when the page communicates with the client based on a refresh operation, and calling fun2 when the page communicates based on a click operation, that is, the page may call different methods at different times, it may be difficult to guarantee that the method on which the page communicates with the client is recorded comprehensively with a small number of recordings.
Therefore, when the recording times of recording the names of the called methods are larger than the preset times, the recorded names of the methods are output, and because the recording times are more, all the methods depended by the communication between the page and the client are easier to cover, so that the names of the methods depended by the communication between the page and the client can be ensured to be recorded comprehensively, and the names of the output methods are also ensured to be comprehensive.
Corresponding to the foregoing embodiments of the page dependency determining method, the present disclosure also proposes embodiments of a page dependency determining apparatus.
Fig. 6 is a schematic block diagram illustrating a page dependency determination apparatus according to an embodiment of the present disclosure. The device shown in the embodiment can be applied to a terminal, such as an electronic device like a mobile phone, a tablet computer, a wearable device, etc. For example, the method is applicable to a client in a mobile phone.
As shown in fig. 6, the page dependency determining apparatus includes:
an instance creation module 101 configured to perform creation of an instance in a page, wherein the page is injected with a global variable by a client, the global variable containing at least one method, and the page communicates with the client by calling the method in the global variable;
the instance agent module 102 is configured to execute, when the page calls a method in the global variable, calling the method in the global variable through the instance, and recording the name of the called method;
an output module 103 configured to execute a name of a method of the output record, so that other clients determine a method on which the page communicates with the client according to the name, and deploy the page at the other clients according to the determined method.
Optionally, the instance agent module is further configured to record attributes of input parameters and attributes of output parameters of the called method;
the output module is further configured to output the attribute of the input parameter and the attribute of the output parameter, so that the other clients determine a method on which the page depends for communication with the client according to the attribute of the input parameter, the attribute of the output parameter and the name, and deploy the page at the other clients according to the determined method.
Optionally, the attribute of the input parameter and/or the attribute of the output parameter comprises at least one of:
data type, data structure.
Optionally, the output module is configured to output the name of the recorded method when a recording duration for recording the name of the called method is greater than a preset duration.
Optionally, the output module is configured to output the name of the recorded method when the number of times of recording the name of the called method is greater than a preset number of times.
With regard to the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the related method, and will not be described in detail here.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
An embodiment of the present disclosure also provides an electronic device, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page dependency determination apparatus method as in any of the above embodiments.
Embodiments of the present disclosure also provide a storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page dependency determination apparatus method according to any of the above embodiments.
Embodiments of the present disclosure further provide a computer program product configured to execute the page dependency determination apparatus method according to any of the above embodiments.
Fig. 7 is a schematic block diagram illustrating an electronic device in accordance with an embodiment of the present disclosure. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the page dependency determination apparatus method described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 may detect an open/closed state of the electronic device 700, the relative positioning of components, such as a display and keypad of the electronic device 700, the sensor assembly 714 may also detect a change in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, orientation or acceleration/deceleration of the electronic device 700, and a change in the temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an embodiment of the present disclosure, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described page dependency determination apparatus method.
In an embodiment of the present disclosure, there is also provided a non-transitory computer-readable storage medium, such as the memory 704 including instructions executable by the processor 720 of the electronic device 700 to perform the page dependency determination apparatus method described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and apparatus provided by the embodiments of the present disclosure are described in detail above, and the principles and embodiments of the present disclosure are explained herein by applying specific examples, and the above description of the embodiments is only used to help understanding the method and core ideas of the present disclosure; meanwhile, for a person skilled in the art, based on the idea of the present disclosure, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present disclosure should not be construed as a limitation to the present disclosure.

Claims (10)

1. A method for determining page dependency, comprising:
creating an instance in a page, wherein the page is injected with a global variable by a client, the global variable comprises at least one method, and the page communicates with the client by calling the method in the global variable;
when the page calls the method in the global variable, calling the method in the global variable through the instance, and recording the name of the called method;
and outputting the name of the recorded method, so that other clients can determine the method on which the page and the client communicate according to the name, and deploying the page at the other clients according to the determined method.
2. The method of claim 1, further comprising:
recording the attribute of the input parameter and the attribute of the output parameter of the called method;
and outputting the attribute of the input parameter and the attribute of the output parameter, so that the other clients determine a method on which the page and the client communicate according to the attribute of the input parameter, the attribute of the output parameter and the name, and deploy the page on the other clients according to the determined method.
3. The method of claim 2, wherein the attributes of the input parameters and/or the attributes of the output parameters comprise at least one of:
data type, data structure.
4. The method of any of claims 1 to 3, wherein the name of the method of outputting the record comprises:
and outputting the name of the recorded method when the recording duration for recording the name of the called method is longer than the preset duration.
5. The method of any of claims 1 to 3, wherein the name of the method of outputting the record comprises:
and outputting the name of the recorded method when the recording times of recording the name of the called method is more than the preset times.
6. A page dependency determination apparatus, comprising:
an instance creation module configured to perform creation of an instance in a page, wherein the page is injected with a global variable by a client, the global variable containing at least one method, and the page communicates with the client by calling the method in the global variable;
the instance proxy module is configured to execute that when the page calls the method in the global variable, the method in the global variable is called through the instance, and the name of the called method is recorded;
and the output module is configured to execute the name of the method for outputting the record, so that other clients can determine the method on which the page is communicated with the client according to the name and deploy the page at the other clients according to the determined method.
7. The apparatus of claim 6, wherein the instance proxy module is further configured to record attributes of input parameters and attributes of output parameters of the called method;
the output module is further configured to output the attribute of the input parameter and the attribute of the output parameter, so that the other clients determine a method on which the page depends for communication with the client according to the attribute of the input parameter, the attribute of the output parameter and the name, and deploy the page at the other clients according to the determined method.
8. The apparatus of claim 7, wherein the attributes of the input parameters and/or the attributes of the output parameters comprise at least one of:
data type, data structure.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page dependency determination method of any one of claims 1 to 5.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page dependency determination method of any one of claims 1 to 5.
CN202010456592.3A 2020-05-26 Page dependency determination method, device, electronic equipment and storage medium Active CN111625274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010456592.3A CN111625274B (en) 2020-05-26 Page dependency determination method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010456592.3A CN111625274B (en) 2020-05-26 Page dependency determination method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111625274A true CN111625274A (en) 2020-09-04
CN111625274B CN111625274B (en) 2024-04-30

Family

ID=

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9141593B1 (en) * 2013-12-20 2015-09-22 Groupon, Inc. System, apparatus, and method for page composition
CN107948250A (en) * 2017-11-02 2018-04-20 努比亚技术有限公司 A kind of method of adjustment and equipment of user's visit capacity
CN109101264A (en) * 2018-07-27 2018-12-28 武汉斗鱼网络科技有限公司 A kind of method and electronic equipment for direct broadcasting room page development
CN110046317A (en) * 2019-03-13 2019-07-23 平安城市建设科技(深圳)有限公司 Page info recording method, terminal and the storage medium of IOS application
CN110069269A (en) * 2019-04-16 2019-07-30 北京字节跳动网络技术有限公司 Update method, apparatus, electronic equipment and the storage medium of the small routine page
CN111177624A (en) * 2019-12-24 2020-05-19 浙江大搜车软件技术有限公司 Website front-back end communication method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9141593B1 (en) * 2013-12-20 2015-09-22 Groupon, Inc. System, apparatus, and method for page composition
CN107948250A (en) * 2017-11-02 2018-04-20 努比亚技术有限公司 A kind of method of adjustment and equipment of user's visit capacity
CN109101264A (en) * 2018-07-27 2018-12-28 武汉斗鱼网络科技有限公司 A kind of method and electronic equipment for direct broadcasting room page development
CN110046317A (en) * 2019-03-13 2019-07-23 平安城市建设科技(深圳)有限公司 Page info recording method, terminal and the storage medium of IOS application
CN110069269A (en) * 2019-04-16 2019-07-30 北京字节跳动网络技术有限公司 Update method, apparatus, electronic equipment and the storage medium of the small routine page
CN111177624A (en) * 2019-12-24 2020-05-19 浙江大搜车软件技术有限公司 Website front-back end communication method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3817395A1 (en) Video recording method and apparatus, device, and readable storage medium
CN105845124B (en) Audio processing method and device
CN107203398B (en) Application distribution method and device
CN107193606B (en) Application distribution method and device
EP3104587A1 (en) Method and apparatus for displaying a conversation interface
CN107463372B (en) Data-driven page updating method and device
CN112433724A (en) Target component style generation method and device, electronic equipment and storage medium
CN110704053B (en) Style information processing method and device
CN106708967B (en) Page display method and device
CN112948704A (en) Model training method and device for information recommendation, electronic equipment and medium
CN113079493A (en) Information matching display method and device and electronic equipment
CN105786561B (en) Method and device for calling process
CN108829473B (en) Event response method, device and storage medium
CN110543265A (en) Page title bar generation method and device, electronic equipment and storage medium
CN111625274B (en) Page dependency determination method, device, electronic equipment and storage medium
CN105630948A (en) Web page display method and apparatus
CN112651012B (en) Information processing method and device
CN105630486B (en) Typesetting method and device for desktop of intelligent terminal equipment
CN110457084B (en) Loading method and device
CN111625274A (en) Page dependence determination method and device, electronic equipment and storage medium
CN113919311A (en) Data display method and device, electronic equipment and storage medium
CN108021399B (en) Note processing method, device and equipment and storage medium
CN107016081A (en) page loading method and device
CN113946228A (en) Statement recommendation method and device, electronic equipment and readable storage medium
CN112333233A (en) Event information reporting method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant