CN111001157B - Method and device for generating reference information, storage medium and electronic device - Google Patents

Method and device for generating reference information, storage medium and electronic device Download PDF

Info

Publication number
CN111001157B
CN111001157B CN201911204506.3A CN201911204506A CN111001157B CN 111001157 B CN111001157 B CN 111001157B CN 201911204506 A CN201911204506 A CN 201911204506A CN 111001157 B CN111001157 B CN 111001157B
Authority
CN
China
Prior art keywords
node
nodes
information
group
reference information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911204506.3A
Other languages
Chinese (zh)
Other versions
CN111001157A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911204506.3A priority Critical patent/CN111001157B/en
Publication of CN111001157A publication Critical patent/CN111001157A/en
Application granted granted Critical
Publication of CN111001157B publication Critical patent/CN111001157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for generating citation information, a storage medium and an electronic device. Wherein, include: acquiring node information of a first node set related to a target interface, wherein each node in the first node set represents an element included in the target interface, the node relation among the nodes in the first node set is a tree relation among the elements included in the target interface, and the node information includes a node name; generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set; and generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set.

Description

Method and device for generating reference information, storage medium and electronic device
Technical Field
The invention relates to the field of computers, in particular to a method and a device for generating citation information, a storage medium and an electronic device.
Background
The user interface is an important part in the game, and the common game comprises a plurality of game interfaces. The interface is a complex tree structure, there may be many children nodes under the root node, and the depth of the tree is often deep.
In a game, in order to provide a function to an interface, it is necessary that the interface can be easily accessed to control an arbitrary node in the interface, to provide a function when a certain button is clicked, or to change the display content of a certain text according to a condition.
Since game performance is of the utmost importance, if it takes too much performance to frequently search the target node from the root node of the interface down depth by depth, the nodes interested by the user are usually found out and the references thereof are cached at one time by adopting a certain method. When the target node is accessed later, the target node is accessed directly through the reference without searching from the root node again.
Therefore, it is necessary for the programmer to record the location, type, etc. of the node of interest in the interface in some way for use in the above process. Usually, there are many nodes in an interface which are interested by a user, and a large amount of text information is written manually by a programmer, so that time and labor are wasted.
Therefore, in the related art, there is a problem of inefficiency in caching the node reference of interest.
Disclosure of Invention
The embodiment of the invention provides a generation method and device of citation information, a storage medium and an electronic device, and aims to at least solve the technical problem of low efficiency in caching the citation of an interested node in the related art.
According to an aspect of the embodiments of the present invention, there is provided a method for generating reference information, including: acquiring node information of a first node set related to a target interface, wherein each node in the first node set represents an element included in the target interface, a node relation among nodes in the first node set is a tree relation among elements included in the target interface, and the node information includes a node name; generating node description information of a second node set according to node information and node relation of the first node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises node names; and generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set.
According to another aspect of the embodiments of the present invention, there is also provided a device for generating citation information, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring node information of a first node set related to a target interface, each node in the first node set represents an element included in the target interface, the node relationship among the nodes in the first node set is a tree relationship among the elements included in the target interface, and the node information includes a node name; the first generating unit is used for generating node description information of a second node set according to node information and node relation of the first node set, wherein the second node set is obtained by carrying out deduplication on nodes in the first node set, and the node description information at least comprises node names; and the second generating unit is used for generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned reference information generating method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-mentioned reference information generating method through the computer program.
In the embodiment of the invention, firstly, the node information of the first node set related to the target interface is obtained, wherein the node information includes a node name, each node in the first node set represents an element included in the target interface, the node relationship of the nodes in the first node set is a tree relationship among the elements included in the target interface, then generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained after the first node set is de-duplicated, and finally generating a reference information set according to the node description information of the second node set, and the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information points to a corresponding element in the target set, and the target element set comprises the elements represented by each node in the second node set. The purpose of automatically generating the reference information set is achieved, so that the technical effects that the first node set is deduplicated after the first node set related to the target interface is obtained, the node description information of the second node information set is generated according to the node information and the node relation of the first node set, and the reference information set is generated according to the node description information of the second node information set are achieved, and the technical problem that in the related technology, in caching the reference of the interested node, the efficiency is low is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an application environment of a method of generating reference information according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating an alternative method for generating reference information according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative node relationship according to an embodiment of the invention;
FIG. 4 is a flow chart diagram illustrating an alternative method for generating reference information according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative single node generation in accordance with embodiments of the present invention;
FIG. 6 is a schematic diagram of an alternative interface in the Unity engine, according to an embodiment of the invention;
FIG. 7 is a schematic diagram of an alternative logical relationship of script A and script B, according to an embodiment of the invention;
fig. 8 is a schematic structural diagram of an alternative reference information generating apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above 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 invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Technical terms involved in the embodiments of the present invention include:
(1) graphical User Interface (GUI): the method refers to a computer operation interface displayed in a graphic mode. The user is allowed to operate icons or menu options on the screen through an input device such as a mouse to perform operations such as selecting a command, calling a file, and the like. In games, a graphical user interface is an important medium for a player to interact with the game, and many operations of the player must be performed through the graphical user interface. In this context, a graphical user interface may be simply a user interface, or UI.
(2) Tree: in computer science, a tree is an abstract data structure, which is composed of nodes and edges, and the edges express the relationship between the nodes. The tree must satisfy that between any two nodes, there is only one path formed by edges. For example, the hierarchical relationship between folders and files in a general computer operating system forms a tree. After defining the concept of direction for the edges of the tree, one can find only one node without predecessors, called the "root" of the tree. For example, the outermost one of the folders in the folder system is their root. The UI of the game is also in a tree structure, one UI comprises a plurality of sub nodes, and each sub node can comprise 0 or a plurality of sub nodes, and the process is repeated.
(3) Depth: starting from the root, the count is incremented by 1 for each edge, and the count at which a node is reached is defined as the depth of the node. The depth of the node with the greatest depth is defined as the depth of the tree.
(4) Performance: like other software, games need to be run on hardware devices such as Personal Computers (PCs), smart phones, and the like. On the same target hardware, the software does the same thing, the consumed time, and the less the computing resource of the hardware, the stronger the performance.
(5) Quote: concepts in a computer programming language. The reference points to the target resource in some way. A reference typically occupies less space than the resource it points to. A reference is saved with little cost, but the target resource can be conveniently revisited.
(6) The game engine: the game development system provides a series of visual development tools and reusable components, and enables developers to conveniently, simply and quickly develop games through integration with a development environment.
(7) Unity: a well-known commercial game engine.
(8) Script: in embodiments of the invention, a script may be understood as a carrier of game logic. The script attached to the interface can search, access and operate the interface element to complete the game logic.
According to an aspect of an embodiment of the present invention, a method for generating reference information is provided. Alternatively, the above-mentioned method for generating the reference information may be applied, but not limited, to the application environment shown in fig. 1. As shown in fig. 1, a client (e.g., Android, iOS or Web) related to a target interface runs on the terminal device 102. Through the client, node information of a first node set related to the target interface can be acquired, wherein each node in the first node set represents one element included in the target interface, a node relationship among nodes in the first node set is a tree relationship among elements included in the target interface, the node information includes a node name, and the node information of the first node set is sent to the server 104 through the network. Server 104 may be a background server for the client. The server 104 responds to the node information and the node relation according to the first node set to generate node description information of a second node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises a node name; and generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set. The above is merely an example, and the embodiments of the present application are not limited herein.
In the terminal device 102, node information of a first node set related to a target interface is obtained, wherein each node in the first node set represents an element included in the target interface, a node relationship among nodes in the first node set is a tree relationship among elements included in the target interface, and the node information includes a node name; generating node description information of a second node set according to node information and node relation of the first node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises node names; and generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set.
Optionally, in this embodiment, the terminal device may be a terminal device configured with a client, and may include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, etc. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The server may be a single server or a server cluster composed of a plurality of servers. The above is only an example, and the present embodiment is not limited to this.
Optionally, in this embodiment, as an optional implementation manner, the method may be executed by a server, or may be executed by a terminal device, or may be executed by both the server and the terminal device, and in this embodiment, the description is given by taking an example that the terminal device (for example, the terminal device 102) executes. As shown in fig. 2, the flow of the above-mentioned reference information generation method may include the steps of:
step S202, obtaining node information of a first node set related to the target interface, wherein each node in the first node set represents an element included in the target interface, the node relationship among the nodes in the first node set is a tree relationship among the elements included in the target interface, and the node information includes a node name;
step S204, generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises node names;
step S206, generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set includes the elements represented by each node in the second node set.
Alternatively, the method for generating the reference information may be, but is not limited to, a scene in which a client is used to play a virtual game.
With the present embodiment, first, node information of a first set of nodes associated with a target interface is obtained, wherein the node information includes a node name, each node in the first node set represents an element included in the target interface, the node relationship of the nodes in the first node set is a tree relationship among the elements included in the target interface, then generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained after the first node set is de-duplicated, and finally generating a reference information set according to the node description information of the second node set, and the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information points to a corresponding element in the target set, and the target element set comprises the elements represented by each node in the second node set. The purpose of automatically generating the reference information set is achieved, so that the technical effects that the first node set is deduplicated after the first node set related to the target interface is obtained, the node description information of the second node information set is generated according to the node information and the node relation of the first node set, and the reference information set is generated according to the node description information of the second node information set are achieved, and the technical problem that in the related technology, in caching the reference of the interested node, the efficiency is low is solved.
The following describes a method for generating the above-mentioned reference information in this embodiment with reference to fig. 2.
In step S202, node information of a first node set related to the target interface is obtained, where each node in the first node set represents an element included in the target interface, a node relationship between nodes in the first node set is a tree relationship between elements included in the target interface, and the node information includes a node name.
Alternatively, the target interface may be understood as a Graphical User Interface (GUI) that is an important medium for a player to interact with a game in a game scenario. A node may be understood as an element contained on an interface, such as may include at least one of: elements that can be displayed, elements that cannot not be displayed, elements that can be interacted with, elements that cannot be interacted with, etc., and different nodes can represent the same element. The node information includes a node name.
The target interface includes one or more nodes, and node information of a first node set related to the target interface can be obtained, where each node in the first node set represents an element included in the target interface, and nodes in the first node set correspond to elements in a tree relationship one to one. It should be understood that the above description is only an example, and the embodiments of the present application are not limited thereto.
As shown in fig. 3, R, O, J, K, P, where R, O, J, K, P represents nodes in the target interface.
Optionally, in this embodiment, the obtaining node information of the first node set related to the target interface may include: acquiring node information of a third node set related to the target interface, wherein elements represented by nodes in the third node set comprise all elements included in the target interface, and the first node set is the third node set; or acquiring node information of a fourth node set related to the target interface, wherein elements represented by nodes in the fourth node set comprise partial elements included in the target interface, the first node set is the fourth node set, and the number of the partial elements is greater than 1; or acquiring node information of a fifth node set related to the target interface, wherein the fifth node set only comprises one node, one node represents one element included in the target interface, and the first node set is the fifth node set.
Optionally, all elements included in the target interface may be obtained to obtain node information of a third node set, where the first node set is the third node set, and at this time, the elements that the user is interested in are all elements in the target interface;
or, obtaining partial elements included in the target interface to obtain node information of a fourth node set, where the first node set is the fourth node set, and at this time, the elements that the user is interested in are partial elements in the target interface;
or, obtaining an element included in the target interface to obtain node information of a fifth node set, where the first node set is the fifth node set, and at this time, the element that the user is interested in is one of the elements in the target interface.
According to the embodiment, the elements which are interested by the user can be obtained through the target interface, the corresponding node set is obtained, a foundation is laid for subsequently generating reference information for the elements which are interested by the user, and the efficiency in caching the reference of the interested nodes is improved.
In step S204, node description information of a second node set is generated according to the node information and the node relationship of the first node set, where the second node set is a node set obtained by performing deduplication on nodes in the first node set, and the node description information at least includes a node name.
Optionally, after obtaining the first node, a deduplication operation is performed on nodes in the first node set, and then a second node set may be obtained according to node information and a node relationship of the first node set, and the node description information may include a node name.
Optionally, in this embodiment, the node information and the node description information both include a node type.
The node information and the node description information may further include a node type.
By the embodiment, under the condition that the node information and the node description information comprise the node name and the node type, the node information and the node description information can be determined more accurately, and the accuracy rate of determining the node which is interested by the user is improved.
Optionally, in this embodiment, generating node description information of the second node set according to the node information and the node relationship of the first node set may include: acquiring the occurrence frequency of each node in the second node set in the first node set; under the condition that the second node set comprises a first group of nodes, setting the node description information of the first group of nodes to comprise the node name of each node in the first group of nodes, wherein the frequency of occurrence of each node in the first group of nodes in the first node set is 1; and under the condition that the second node set comprises a second group of nodes, determining a query path of each node in the second group of nodes in the node relationship, and setting the node description information of the second group of nodes to comprise the node name and the query path of each node in the second group of nodes, wherein the frequency of occurrence of each node in the second group of nodes in the first node set is more than 1.
Optionally, for each node in the second node set, the node may appear in the first node set 1 time, or may appear in the first node set more than 1 time, first, the number of times that each node in the second node set appears in the first node set is obtained, and a node whose number of times that each node in the first node set appears is 1 time is determined as a first group of nodes (the second node set includes the first group of nodes), where the node description information of the first group of nodes may be set to include the node name of each node in the first group of nodes.
And determining nodes which appear more than 1 time in the first node set as a second group of nodes (the second node set comprises the second group of nodes), and then determining query paths of the second group of nodes in the node relationship, wherein the node description information of the second group of nodes can be set to include the node name of each node in the second group of nodes and the query paths of the second group of nodes in the node relationship.
For example, as shown in FIG. 3, taking node P as an example, the number of occurrences of node P is 2, and the query path of node P can be R- > O- > P and R- > J- > P. When determining the query path of the P node, the root node of the P node may be found upward from the P node, or the root node may be found first, and the whole tree is subjected to a full-scale method, so as to determine the query path of the P node.
According to the embodiment, the node description information of the node appearing in the first node set for 1 time is set by the node name, and the node description information of the node appearing in the first node set for more than 1 time is set by the node name and the query path, so that the node description information of the node can be accurately recorded, the text information space can be saved for the node appearing only for 1 time, and the efficiency of subsequently determining the reference information of the node interested by the user is improved.
Optionally, in this embodiment, determining a query path of each node in the second group of nodes in the node relationship may include: a path between each node in the second set of nodes to a root node in the node relationship is determined as a query path.
Alternatively, the query path of each node in the node relationship in the second group of nodes may be understood as a path from each node in the second group of nodes to the root node in the node relationship.
For example, as shown in FIG. 3, taking node P as an example, the query path for node P can be R- > O- > P and R- > J- > P, or P- > O- > R and P- > J- > R. When determining the query path of the P node, the root node of the P node may be found upward from the P node, or the root node may be found first, and the whole tree is subjected to a full-scale method, so as to determine the query path of the P node.
It is understood that the above is only an example, and the present embodiment is not limited thereto.
By the method and the device, the node description information of each node in the second group of nodes can be accurately set through the query path, and the accuracy of setting the node description information is improved.
In step S206, a reference information set is generated according to the node description information of the second node set, where the reference information in the reference information set corresponds to an element in the target element set one by one, each reference information is used to point to a corresponding element in the target element set, and the target element set includes the element represented by each node in the second node set.
Optionally, after the step S204, a reference information set may be generated according to node description information of the second node set, where reference information in the reference information set corresponds to an element in the target element set in a one-to-one correspondence manner, and each reference information in the reference information set corresponds to one element in the target element set, and the target element set includes an element represented by each node in the second node set.
The target element set can be understood as a node which is interested by a user, and elements in the target element set can be conveniently accessed through the reference information set.
Optionally, in this embodiment, generating the reference information set according to the node description information of the second node set may include: and under the condition that the second node set comprises a first group of nodes, generating a corresponding first reference information set in parallel according to the node description information of each node in the first group of nodes, wherein the frequency of occurrence of each node in the first group of nodes in the first node set is 1, the reference information set comprises the first reference information set, and the node description information of each node in the first group of nodes comprises the node name of each node in the first group of nodes.
Alternatively, how to generate the reference information set according to the node description information of the second node set may be implemented by, if the second node information set includes the first group of nodes (each node in the first group of nodes appears in the first node set 1 times), generating a corresponding first reference information set according to the node description information of each node in the first group of nodes in parallel, and the node description information of each node in the first reference information set includes the node name of each node in the first group of nodes, which may be understood that the reference information set includes the first reference information set.
By the embodiment, under the condition that the second node set comprises the first group of nodes, the corresponding first reference information set can be automatically generated in parallel, so that a programmer is prevented from manually writing a large amount of text information, time is saved, and efficiency of generating the reference information set is improved.
Optionally, in this embodiment, generating a corresponding first reference information set in parallel according to the node description information of each node in the first group of nodes may include: performing the following operations in parallel on the node description information of each node in the first set of nodes, wherein each node in the first set of nodes is considered to be a current node when performing the following operations: searching for a current element matched with the node name included in the node description information of the current node in the elements included in the target interface; and generating a node name included in the node description information of the current node as current reference information, wherein the current reference information is used for pointing to the current element, and the first reference information set comprises the current reference information. .
Optionally, how to generate the corresponding first reference information set according to the node description information of each node in the first group of nodes in parallel may be implemented by regarding each node in the first group of nodes as a current node when performing the following operations, first, in an element included in the target interface, searching a current element matching a node name of the node description information of the current node in parallel, and then generating current reference information from the node name of the current node, where the current reference information may point to the current element, where the first reference information set includes the current reference information.
The above is merely an example and is not intended to be limiting.
By the embodiment, the current reference information can be generated in parallel, so that a programmer is prevented from manually writing a large amount of character information, time is saved, and efficiency of generating the reference information set is improved.
Optionally, in this embodiment, generating the reference information set according to the node description information of the second node set may include: and under the condition that the second node set comprises a second group of nodes, respectively generating a corresponding second reference information set according to the node description information of each node in the second group of nodes, wherein the frequency of occurrence of each node in the second group of nodes in the first node set is more than 1, the reference information set comprises the second reference information set, and the node description information of each node in the second group of nodes comprises the node name of each node in the second group of nodes and the query path of each node in the node relationship.
Optionally, how to generate the reference information set according to the node description information of the second node set may also be implemented in a manner that, if the second node information set includes the second group of nodes (the number of times that each node in the second group of nodes appears in the first node set is greater than 1), a corresponding second reference information set is generated according to the node description information of each node in the second group of nodes, and the node description information of each node in the second reference information set includes the node name of each node in the second group of nodes and the query path of each node in the node relationship, it is understood that the reference information set includes the second reference information set.
Because the occurrence frequency of each node in the second group of nodes in the first node set is more than 1, the error rate of generating the reference information set can be reduced by respectively generating the reference information of each node in the second group of nodes.
Through the embodiment, under the condition that the second node set comprises the second group of nodes, the corresponding second reference information sets can be respectively and automatically generated, so that not only is the situation that a programmer manually writes a large amount of text information avoided, the time is saved, but also the error rate of generating the second reference information set according to the second group of nodes is reduced, and the efficiency of generating the reference information sets is improved.
Optionally, in this embodiment, generating a corresponding second reference information set according to the node description information of each node in the second group of nodes respectively may include: performing the following operations on the node description information of each node in the second set of nodes, wherein each node in the second set of nodes is considered to be a current node when performing the following operations: searching a current element matched with a target node name on a target query path in elements included in a target interface, wherein the target query path is a query path included in node description information of a current node, and the target node name is a node name included in the node description information of the current node; and generating a node name included in the node description information of the current node as current reference information, wherein the current reference information is used for pointing to the current element, and the second reference information set comprises the current reference information.
Optionally, how to generate the corresponding second reference information set according to the node description information of each node in the second group of nodes may be implemented in such a way that, when the following operations are performed, each node in the second group of nodes is regarded as a current node, first, in the elements included in the target interface, a current element matching the name of the target node on the target query path is found through the target query path in the node description information of the current node, and then, the current reference information is generated from the node name of the current node, and the current reference information may point to the current element, where the second reference information set includes the current reference information.
By searching the query path, the reference information of each node in the second group of nodes is generated, so that the error rate of generating the reference information set can be reduced.
Through the embodiment, under the condition that the second node set comprises the second group of nodes, the corresponding second reference information sets can be respectively and automatically generated, so that not only is the situation that a programmer manually writes a large amount of text information avoided, the time is saved, but also the error rate of generating the second reference information set according to the second group of nodes is reduced, and the efficiency of generating the reference information sets is improved.
It should be noted that, taking the interface in Unity as an example, one method is as follows: a script is created that attaches to the root node of the interface, and declares a variable for all nodes of interest. This variable, either public or private, can be marked as serializable so that it can be seen in the Unity editor. In the Unity editor, a programmer drags and assigns the interested nodes to variables in a one-to-one correspondence mode through a drag-and-drop (drag-and-drop) mode. When saving the interface, the script attached to the interface can save the assigned variables together.
When the interface is used, the variable of the access script can access the node of interest. By the mode, although a large amount of writing work is avoided, the problem of large dragging workload exists, and the efficiency is low.
In order to solve the above problem, the following describes a flow of a reference information generation method with reference to an optional example, and as shown in fig. 4, the method includes the following steps:
step S402, interface source information is obtained.
It should be noted that, depending on the game engine, the interface may be represented differently, but the amount of information contained is usually indistinguishable. Taking Unity as an example, when the interface is stored in a file, Unity adopts prefab format constructed based on a text file in yaml format.
When the interface is running at Unity, such as during editor editing, or when the game is running. The interface is present in some way on the memory. In the abstraction provided by Unity, it can be represented by a GameObject containing child nodes.
Whatever form of representation the interface takes, the interface source information can be derived as long as the manner of representation is known. For example, a parser (parser) may be implemented to read the hierarchical relationship of the whole interface from the prefab text file; in the editor, a plug-in of Unity can be written to obtain the hierarchical relationship of the interface. In this embodiment, interface source information may also be directly obtained from the GameObject representation of the interface through a Unity plug-in. The interface may correspond to the target interface, and the interface source information may correspond to the node information of the first node set.
Alternatively, in Unity, there may be two sources for obtaining interface source information: the first is the file saved in the interface, and the second is the memory representation of the interface in the editor.
Where the first source is used, it is possible to make the tool a third party tool independent of the Unity engine, or as a plug-in to Unity; with the second source, it is only possible to implement the tool as a plug-in.
When the first source is used, complex text analysis is required, and when no proper library exists, a large number of codes are required to be written for implementation; when the second source is used as a plug-in, the functionality of the Unity self-contained system can meet the requirement, and almost no conversion in any form is needed.
In this embodiment, a second source may be selected and the tool implemented as a plug-in to read the contents of the input interface.
Step S404, converting the interface source information into an intermediate representation.
After the interface source information is obtained, various operations can be performed on the interface source information, and the interface source information is converted into an intermediate representation (which acts as the second node set). The intermediate representation may remove information that is not useful in the interface source information and may add other information that is useful in generating the target output. For example, information such as the coordinate position of the node in the interface source information may be ignored.
The goal of the intermediate representation is to be simple but to meet functional requirements.
In general, the intermediate representation may be a simplified tree that is structured the same as the source interface, but with useless information removed. With this representation, a total of two traversals of the tree are required in generating the tree of the intermediate representation and the target output from the intermediate representation.
The intermediate representation comprises the following information, namely a key value storage for storing the repeated times of the node name; and the stack stores nodes with depth information and output texts in the generation process.
In step S406, a target output is generated.
In this embodiment, the search cache logic of the corresponding item may be adapted to output the target as the text description information in the specific format corresponding to the item.
The format of the output text may be output in the following format:
{name=”GiftPane1”,
type=”MVCView”,
},
{name=”MessageArea”,
type=”GameObject”,
},
},
{name=”SendBtn”,
type=”CommonUIButton”,
},
{name=”AUTONAME_MessageAreaSendBtnRedPoint”,
type=”UIRedPoint”,
stack=”MessageArea/SendBtn/RedPoint”
}
that is, the output text may be formatted to include a node name and a node type, and/or to include a node name, a node type, and a query path (relationship between nodes).
It should be noted that, when all child nodes (node name, node type, and relationship between nodes) of the interface can be obtained by using the Unity providing interface, the number of times of the child node name repetition is generated according to the information. For nodes with non-repeated node names, a complete path of the node is not required to be given when the output text is generated, and for nodes with repeated node names, a complete path of the node is required to be given when the output text is generated.
The interface is then traversed using a stack. And for each traversed node, generating a target text of the current node according to the node name of the current node and the repeated times of the node name, and connecting the target text to the final output text.
In step S408, the programmer deletes nodes that are not interested by the user by means of human modification.
The programmer deletes nodes which are not interested by the user in a manual modification mode, and can replace names for the nodes and the like.
An application environment of the reference information generation method is described below with reference to an alternative example:
taking the interface in the Unity engine as an example, the user interface in a game is shown in fig. 6. The interface is in a tree structure, a plurality of child nodes are contained under the root node, and each child node can contain a child node thereof. In fig. 6, each english name is a node name of each node.
As shown in FIG. 7, the user interface root node may be attached to a fixed script A that is dependent on another script B. The script A realizes various general logics of the game interface, and comprises the steps that according to the information of the interested nodes provided by the script B, the nodes can be conveniently accessed through the script B when the work of searching and caching the nodes is carried out, and the actual game interface logic is implemented.
The B script contains node text information (a plurality of necessary information):
such as node name or query path, for locating and uniquely selecting a node for the a-script search.
Such as the naming of the nodes. When the B script is actually used, the reference of the node is accessed through node naming.
The node text information may be supplemented with other useful information. For example, the node type of the additional node can make the B script know the node type of the node, which is convenient for realizing specific functions. The node text information acts as the output text information and acts as the node description information.
The node text information may be directly manipulated at the editor interface, or the programmer may do a small amount of text editing work.
In this embodiment, there are two modes, one is a full mode and the other is a single child node mode. The full mode is suitable for being used when an interface is newly made, and the single child node mode is suitable for being used when the interface is modified.
In the full-volume mode, a target user interface is selected in the editor, and text information of all child nodes can be generated by one key by using the plug-in realized in the embodiment and automatically copied to the clipboard. The programmer can paste the text in the B script directly and use the B script after modification.
In the single child node mode, the editor selects any child node, and the plug-in function is called through the menu, so that the text information of the child node can be generated and copied to the clipboard. The programmer can paste the text in the B script.
It should be noted that the entry of the single node mode is a certain target node. Starting with the node, its root node is found up. The manner in which the root node is found depends on the particular project. The interface root node necessarily contains the A script, and the first node containing the A script can be found upwards. And recording the name of each passing node in the process, so that the complete path of the target node can be obtained.
When the number of times of repetition of the node name needs to be judged, the root node can be found first, and a node name repetition number table is generated for the whole tree by using a full-quantity method. Thereby determining whether the target node name is duplicated with other nodes.
In Unity, the target node, as a GameObject, may attach several components, of which 1 or more or all may be of practical interest.
Each node in the interface will contain some common Component, such as Transform. In this embodiment, a global Component blacklist may be established, and components that are mostly uninteresting may be recorded therein. When traversing nodes, searching components outside the blacklist as default output types preferentially. When the object can not be found, the GameObject is output as a warranty type.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to still another aspect of the embodiments of the present invention, there is also provided a reference information generating apparatus, as shown in fig. 8, the apparatus including:
(1) an obtaining unit 802, configured to obtain node information of a first node set related to a target interface, where each node in the first node set represents an element included in the target interface, a node relationship between nodes in the first node set is a tree relationship between elements included in the target interface, and the node information includes a node name;
(2) a first generating unit 804, configured to generate node description information of a second node set according to node information and a node relationship of a first node set, where the second node set is a node set obtained by performing deduplication on nodes in the first node set, and the node description information at least includes a node name;
(3) a second generating unit 806, configured to generate a reference information set according to node description information of the second node set, where reference information in the reference information set corresponds to an element in the target element set one by one, each reference information is used to point to a corresponding element in the target element set, and the target element set includes an element represented by each node in the second node set.
Alternatively, the obtaining unit 802 may be configured to perform step S202, the first generating unit 804 may be configured to perform step S204, and the second generating unit 806 may be configured to perform step S206.
With the present embodiment, first, node information of a first set of nodes associated with a target interface is obtained, wherein the node information includes a node name, each node in the first node set represents an element included in the target interface, the node relationship of the nodes in the first node set is a tree relationship among the elements included in the target interface, then generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained after the first node set is de-duplicated, and finally generating a reference information set according to the node description information of the second node set, and the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information points to a corresponding element in the target set, and the target element set comprises the elements represented by each node in the second node set. The purpose of automatically generating the reference information set is achieved, so that the technical effects that the first node set is deduplicated after the first node set related to the target interface is obtained, the node description information of the second node information set is generated according to the node information and the node relation of the first node set, and the reference information set is generated according to the node description information of the second node information set are achieved, and the technical problem that in the related technology, in caching the reference of the interested node, the efficiency is low is solved.
As an optional technical solution, the first generating unit includes:
(1) the first acquisition module is used for acquiring the frequency of each node in the second node set in the first node set;
(2) the node description information of the first group of nodes is set to include the node name of each node in the first group of nodes under the condition that the second node set comprises the first group of nodes, wherein the frequency of occurrence of each node in the first group of nodes in the first node set is 1;
(3) and the first determining module is used for determining a query path of each node in the second group of nodes in the node relationship under the condition that the second node set comprises the second group of nodes, and setting the node description information of the second group of nodes to comprise the node name and the query path of each node in the second group of nodes, wherein the frequency of occurrence of each node in the first group of nodes in the first node set is more than 1.
As an optional technical solution, the first determining module is further configured to determine, as the query path, a path between each node in the second group of nodes and a root node in the node relationship. .
As an optional technical solution, the second generating unit includes:
(1) the first generation module is used for generating a corresponding first reference information set according to the node description information of each node in the first group of nodes in parallel under the condition that the second node set comprises the first group of nodes, wherein the frequency of occurrence of each node in the first group of nodes in the first node set is 1, the reference information set comprises the first reference information set, and the node description information of each node in the first group of nodes comprises the node name of each node in the first group of nodes.
As an optional technical solution, the first generating module is further configured to perform the following operations on the node description information of each node in the first group of nodes in parallel, where each node in the first group of nodes is regarded as a current node when the following operations are performed: searching for a current element matched with the node name included in the node description information of the current node in the elements included in the target interface; and generating a node name included in the node description information of the current node as current reference information, wherein the current reference information is used for pointing to the current element, and the first reference information set comprises the current reference information.
As an optional technical solution, the second generating unit includes:
(1) and the second generation module is used for generating a corresponding second reference information set according to the node description information of each node in the second group of nodes respectively under the condition that the second node set comprises the second group of nodes, wherein the frequency of occurrence of each node in the second group of nodes in the first node set is more than 1, the reference information set comprises the second reference information set, and the node description information of each node in the second group of nodes comprises the node name of each node in the second group of nodes and the query path of each node in the node relationship.
As an optional technical solution, the second generating module is further configured to perform the following operations on the node description information of each node in the second group of nodes, where each node in the second group of nodes is regarded as a current node when performing the following operations: searching a current element matched with a target node name on a target query path in elements included in a target interface, wherein the target query path is a query path included in node description information of a current node, and the target node name is a node name included in the node description information of the current node; and generating a node name included in the node description information of the current node as current reference information, wherein the current reference information is used for pointing to the current element, and the second reference information set comprises the current reference information.
As an optional technical solution, the obtaining unit includes:
(1) a second obtaining module, configured to obtain node information of a third node set related to the target interface, where elements represented by nodes in the third node set include all elements included in the target interface, and the first node set is the third node set; or
(2) A third obtaining module, configured to obtain node information of a fourth node set related to the target interface, where elements represented by nodes in the fourth node set include partial elements included in the target interface, the first node set is the fourth node set, and the number of the partial elements is greater than 1; or
(3) A fourth obtaining module, configured to obtain node information of a fifth node set related to the target interface, where the fifth node set only includes one node, and one node represents one element included in the target interface, and the first node set is the fifth node set.
As an optional technical solution, the node information and the node description information both include a node type.
According to a further aspect of embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring node information of a first node set related to the target interface, wherein each node in the first node set represents an element included in the target interface, the node relationship among the nodes in the first node set is a tree relationship among the elements included in the target interface, and the node information includes a node name;
s2, generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises node names;
and S3, generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, ROM (Read-Only Memory), RAM (Random Access Memory), magnetic or optical disks, and the like.
According to still another aspect of the embodiments of the present invention, there is further provided an electronic apparatus for implementing the method for generating reference information, as shown in fig. 9, the electronic apparatus includes a memory 902 and a processor 904, the memory 902 stores a computer program, and the processor 904 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring node information of a first node set related to the target interface, wherein each node in the first node set represents an element included in the target interface, the node relationship among the nodes in the first node set is a tree relationship among the elements included in the target interface, and the node information includes a node name;
s2, generating node description information of a second node set according to the node information and the node relation of the first node set, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises node names;
and S3, generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to the elements in the target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be configured to store software programs and modules, such as program instructions/modules corresponding to the reference information generating method and apparatus in the embodiment of the present invention, and the processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, implements the above-described reference information generating method. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory located remotely from the processor 904, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, an obtaining unit 802, a first generating unit 804, and a second generating unit 806 in the generating apparatus that includes the reference information. In addition, the above-mentioned reference information generating apparatus may further include, but is not limited to, other module units in the above-mentioned reference information generating apparatus, which is not described in detail in this example.
Optionally, the transmitting device 906 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 906 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 906 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 908; and a connection bus 910 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal or the server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication form. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (13)

1. A method for generating reference information, comprising:
acquiring node information of a first node set related to a target interface, wherein each node in the first node set represents an element included in the target interface, a node relationship among nodes in the first node set is a tree relationship among elements included in the target interface, and the node information includes a node name;
generating node description information of a second node set according to the node information of the first node set and the node relation, wherein the second node set is a node set obtained by carrying out de-duplication on nodes in the first node set, and the node description information at least comprises node names;
generating a reference information set according to the node description information of the second node set, wherein the reference information in the reference information set corresponds to elements in a target element set one by one, each reference information is used for pointing to a corresponding element in the target element set, and the target element set comprises the elements represented by each node in the second node set;
generating node description information of a second node set according to the node information of the first node set and the node relation, wherein the node description information comprises:
acquiring the occurrence times of each node in the second node set in the first node set; in the case that the second node set comprises a first group of nodes, setting node description information of the first group of nodes to comprise a node name of each node in the first group of nodes, wherein the number of times that each node in the first group of nodes appears in the first node set is 1; and under the condition that the second node set comprises a second group of nodes, determining a query path of each node in the second group of nodes in the node relationship, and setting the node description information of the second group of nodes to comprise the node name and the query path of each node in the second group of nodes, wherein the frequency of occurrence of each node in the second group of nodes in the first node set is more than 1.
2. The method of claim 1, wherein determining the query path for each node in the second set of nodes in the node relationship comprises:
determining a path between each node in the second set of nodes to a root node in the node relationship as the query path.
3. The method of claim 1, wherein generating the set of reference information from the node description information of the second set of nodes comprises:
and under the condition that the second node set comprises a first group of nodes, generating a corresponding first reference information set in parallel according to the node description information of each node in the first group of nodes, wherein the frequency of occurrence of each node in the first group of nodes in the first node set is 1, the reference information set comprises the first reference information set, and the node description information of each node in the first group of nodes comprises the node name of each node in the first group of nodes.
4. The method of claim 3, wherein the generating, in parallel, a corresponding first set of reference information from the node description information of each node in the first set of nodes comprises:
performing the following in parallel on the node description information for each node in the first set of nodes, wherein each node in the first set of nodes is considered to be a current node when performing the following:
searching for a current element matched with the node name included in the node description information of the current node in the elements included in the target interface;
and generating a node name included in the node description information of the current node as current reference information, wherein the current reference information is used for pointing to the current element, and the first reference information set includes the current reference information.
5. The method of claim 1, wherein generating the set of reference information from the node description information of the second set of nodes comprises:
and under the condition that the second node set comprises a second group of nodes, respectively generating a corresponding second reference information set according to the node description information of each node in the second group of nodes, wherein the frequency of occurrence of each node in the second group of nodes in the first node set is greater than 1, the reference information set comprises the second reference information set, and the node description information of each node in the second group of nodes comprises the node name of each node in the second group of nodes and the query path of each node in the node relationship.
6. The method according to claim 5, wherein the generating a corresponding second reference information set according to the node description information of each node in the second group of nodes respectively comprises:
performing the following operations on the node description information of each node in the second set of nodes, wherein each node in the second set of nodes is considered to be a current node when performing the following operations:
searching a current element matched with a target node name on a target query path in the elements included in the target interface, wherein the target query path is a query path included in the node description information of the current node, and the target node name is a node name included in the node description information of the current node;
and generating a node name included in the node description information of the current node as current reference information, wherein the current reference information is used for pointing to the current element, and the second reference information set includes the current reference information.
7. The method of claim 1, wherein obtaining node information for a first set of nodes associated with a target interface comprises:
acquiring node information of a third node set related to the target interface, wherein elements represented by nodes in the third node set comprise all elements included in the target interface, and the first node set is the third node set; or
Acquiring node information of a fourth node set related to the target interface, wherein elements represented by nodes in the fourth node set include partial elements included in the target interface, the first node set is the fourth node set, and the number of the partial elements is greater than 1; or
Acquiring node information of a fifth node set related to the target interface, wherein the fifth node set only includes one node, the one node represents one element included in the target interface, and the first node set is the fifth node set.
8. The method according to any of claims 1 to 7, wherein the node information and the node description information each comprise a node type.
9. An apparatus for generating reference information, comprising:
an obtaining unit, configured to obtain node information of a first node set related to a target interface, where each node in the first node set represents an element included in the target interface, a node relationship between nodes in the first node set is a tree relationship between elements included in the target interface, and the node information includes a node name;
a first generating unit, configured to generate node description information of a second node set according to node information of the first node set and the node relationship, where the second node set is a node set obtained by performing deduplication on nodes in the first node set, and the node description information at least includes a node name;
a second generating unit, configured to generate a reference information set according to node description information of the second node set, where reference information in the reference information set corresponds to an element in a target element set in a one-to-one manner, each piece of reference information is used to point to a corresponding element in the target element set, and the target element set includes an element represented by each node in the second node set;
the first generation unit includes:
a first obtaining module, configured to obtain the number of times that each node in the second node set appears in the first node set;
a setting module, configured to, if the second node set includes a first group of nodes, set node description information of the first group of nodes to include a node name of each node in the first group of nodes, where the number of times that each node in the first group of nodes appears in the first node set is 1;
a first determining module, configured to determine, when the second node set includes a second group of nodes, a query path of each node in the second group of nodes in the node relationship, and set node description information of the second group of nodes to include a node name and the query path of each node in the second group of nodes, where a number of times that each node in the first group of nodes appears in the first node set is greater than 1.
10. The apparatus of claim 9, wherein the first determining module is further configured to determine a path between each node in the second set of nodes to a root node in the node relationship as the query path.
11. The apparatus of claim 9, wherein the second generating unit comprises:
a first generating module, configured to generate, in parallel, a corresponding first reference information set according to node description information of each node in the first group of nodes when the second node set includes the first group of nodes, where the number of times that each node in the first group of nodes appears in the first node set is 1, the reference information set includes the first reference information set, and the node description information of each node in the first group of nodes includes a node name of each node in the first group of nodes.
12. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 8.
13. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 8 by means of the computer program.
CN201911204506.3A 2019-11-29 2019-11-29 Method and device for generating reference information, storage medium and electronic device Active CN111001157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911204506.3A CN111001157B (en) 2019-11-29 2019-11-29 Method and device for generating reference information, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911204506.3A CN111001157B (en) 2019-11-29 2019-11-29 Method and device for generating reference information, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111001157A CN111001157A (en) 2020-04-14
CN111001157B true CN111001157B (en) 2021-09-28

Family

ID=70113380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911204506.3A Active CN111001157B (en) 2019-11-29 2019-11-29 Method and device for generating reference information, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111001157B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112190923B (en) * 2020-10-15 2024-05-14 网易(杭州)网络有限公司 Game event processing method in game, server and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034350A (en) * 2007-04-17 2007-09-12 珠海金山软件股份有限公司 Device and method for quick searching computer program functional entrance
CN102968498A (en) * 2012-12-05 2013-03-13 华为技术有限公司 Method and device for processing data
CN103139224A (en) * 2011-11-22 2013-06-05 腾讯科技(深圳)有限公司 Network file system and method for accessing network file system
CN106547761A (en) * 2015-09-18 2017-03-29 北京国双科技有限公司 Data processing method and device
CN108829471A (en) * 2018-05-09 2018-11-16 深圳壹账通智能科技有限公司 Control path generating method, device, computer equipment and storage medium
CN110174982A (en) * 2017-05-16 2019-08-27 苹果公司 Equipment, method and graphic user interface for navigating between user interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8949823B2 (en) * 2011-11-16 2015-02-03 Flextronics Ap, Llc On board vehicle installation supervisor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034350A (en) * 2007-04-17 2007-09-12 珠海金山软件股份有限公司 Device and method for quick searching computer program functional entrance
CN103139224A (en) * 2011-11-22 2013-06-05 腾讯科技(深圳)有限公司 Network file system and method for accessing network file system
CN102968498A (en) * 2012-12-05 2013-03-13 华为技术有限公司 Method and device for processing data
CN106547761A (en) * 2015-09-18 2017-03-29 北京国双科技有限公司 Data processing method and device
CN110174982A (en) * 2017-05-16 2019-08-27 苹果公司 Equipment, method and graphic user interface for navigating between user interface
CN108829471A (en) * 2018-05-09 2018-11-16 深圳壹账通智能科技有限公司 Control path generating method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111001157A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
US10817263B2 (en) Workflow development system with ease-of-use features
CN109634598B (en) Page display method, device, equipment and storage medium
US20210034336A1 (en) Executing a process-based software application in a first computing environment and a second computing environment
CN102520841B (en) Collection user interface
US9395890B2 (en) Automatic discovery of system behavior
CN109074537A (en) The lazy of template generates
WO2018036342A1 (en) Csar-based template design visualization method and device
CN111966633B (en) Method, device, electronic equipment and medium for inquiring child node under directory
CN108304676B (en) Automatic reconstruction method for three-dimensional model of assembly body, terminal device and storage medium
CN104484216A (en) Method and device for generating service interface document and on-line test tool
CN109634607A (en) A kind of method and device of Code automatic build
CN103699597A (en) Method for downloading file through browser and browser
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN112860247A (en) Custom generation method, device, equipment and medium for model component
US20170010764A1 (en) Pivot-based tile gallery with adapted tile(s)
CN111538500A (en) Method and system for visually modifying menu
CN109840201B (en) UI test method, device, electronic equipment and computer readable storage medium
CN111001157B (en) Method and device for generating reference information, storage medium and electronic device
CN104956326A (en) Test script creation based on abstract test user controls
CN102779045A (en) Interface generating method, interface editor and electronic equipment
CN111831320A (en) Plug-in management method and device, electronic equipment and storage medium
US10147061B2 (en) Integrating a construction jobsite system with external tools
JP2021120899A (en) User identification method, device, storage medium, and electronic apparatus
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN112988176A (en) Channel package generation method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021748

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant