Work item query method and device, equipment and storage medium

By establishing three mapping relationship tables in the work item query method, the problem of not being able to query based on work item version in the existing technology is solved, and accurate query and version management of work items are realized.

CN116226192BActive Publication Date: 2026-05-05CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2022-12-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The existing technology does not allow querying work items based on their version, which makes it impossible to query effectively when errors occur during the use of work items.

Method used

By establishing three mapping relationship tables, including the first mapping relationship, the second mapping relationship, and the third mapping relationship, which are used to associate the identifier of the work item with the version number, the version identifier with the field identifier, and the field identifier with the field name and field value, respectively, it is possible to query the field name and field value corresponding to the target work item based on the identifier and version number of the target work item.

Benefits of technology

It enables efficient querying of work items based on version number, ensuring the accuracy of work items and the reliability of queries, and supports the display, modification, and restoration of work item version information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226192B_ABST
    Figure CN116226192B_ABST
Patent Text Reader

Abstract

This application relates to a work item query method, apparatus, device, and storage medium, and pertains to the field of computer technology. The method includes: receiving a work item query request from a user device; wherein the work item query request includes an identifier and a target version number of a target work item; based on the identifier and target version number of the target work item, querying a target version identifier corresponding to the target version number of the target work item from a first mapping relationship; wherein the first mapping relationship includes identifiers, version identifiers, and version numbers of different work items; querying a target field identifier from a second mapping relationship based on the target version identifier; wherein the second mapping relationship includes one or more field identifiers corresponding to different version identifiers; and querying a field name and field value corresponding to the target version number of the target work item from a third mapping relationship based on the target field identifier; wherein the third mapping relationship includes field names and field values ​​corresponding to different field identifiers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for querying work items. Background Technology

[0002] A work item is a smaller, more specific task derived from a detailed analysis of a large, abstract work project. It is used to develop more accurate work plans and facilitate teamwork. A work item typically includes a description of the work content, the person in charge, the estimated work time, and the completion time.

[0003] Currently, the open-source distributed version control system Git is mainly used to save different versions of work items as files. However, when an error occurs in a work item, it is not possible to query the work item based on its version. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for querying work items, to at least solve the technical problem in related technologies that it is impossible to query work items based on work item version. The technical solution of this application is as follows:

[0005] According to a first aspect of the embodiments of this application, a work item query method is provided, comprising: receiving a work item query request sent by a user equipment; the work item query request includes an identifier and a target version number of a target work item; querying a target version identifier corresponding to the target version number of the target work item from a first mapping relationship based on the identifier and target version number of the target work item; the first mapping relationship includes identifiers, version identifiers, and version numbers of different work items; querying a target field identifier from a second mapping relationship based on the target version identifier; the second mapping relationship includes one or more field identifiers corresponding to different version identifiers; querying a field name and field value corresponding to the target version number of the target work item from a third mapping relationship based on the target field identifier; the third mapping relationship includes field names and field values ​​corresponding to different field identifiers.

[0006] In one possible implementation, the method further includes: receiving a version information query request from a user device; the version information query request includes the current version number of the target work item; querying the parent version number of the current version number from a first mapping relationship based on the current version number, until the initial version number of the target work item is found, to obtain the version information of the target work item; the version information includes all version numbers of the target work item and the parent-child relationship between two adjacent version numbers; and sending the version information of the target work item to the user device so that the user device displays the version information of the target work item.

[0007] In one possible implementation, the method further includes: receiving a work item modification request sent by a user equipment; the work item modification request includes an identifier of a target work item and a modification field; the modification field includes a field name to be modified and a field value of the field name to be modified; generating an update version number of the modification field; updating a first mapping relationship based on the update version number and the identifier of the target work item; in the updated first mapping relationship, the current version number of the target work item is the update version number, and the parent version number of the update version number is the current version number of the target work item before the update; comparing the modification field with the parent version field to obtain a first field name, a second field name, and a field value of the second field name; the parent version field is the content of the parent version of the update version number; the first field name is the field name in which both the field name and field value are the same in the modification field and the parent version field; the second field name is the field name in which either the field name or field value is different in the modification field and the parent version field; updating a third mapping relationship based on the second field name and the field value of the second field name; and updating a second mapping relationship based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number.

[0008] In one possible implementation, the method further includes: receiving a work item recovery request sent by a user equipment; the work item recovery request includes an identifier of a target work item and a version number to be recovered; if a version number to be recovered exists in the first mapping relationship, updating the version number to be recovered to the current version number of the target work item; and updating the first mapping relationship and the second mapping relationship based on the version number to be recovered.

[0009] According to a second aspect of the embodiments of this application, a work item query apparatus is provided, comprising: a receiving unit and a querying unit; the receiving unit is configured to receive a work item query request sent by a user equipment; the work item query request includes an identifier of a target work item and a target version number; the querying unit is configured to query a target version identifier corresponding to the target version number of the target work item from a first mapping relationship based on the identifier of the target work item and the target version number; the first mapping relationship includes identifiers, version identifiers, and version numbers of different work items; the querying unit is further configured to query a target field identifier from a second mapping relationship based on the target version identifier; the second mapping relationship includes one or more field identifiers corresponding to different version identifiers; the querying unit is further configured to query a field name and field value corresponding to the target version number of the target work item from a third mapping relationship based on the target field identifier; the third mapping relationship includes field names and field values ​​corresponding to different field identifiers.

[0010] In one possible implementation, the above-mentioned work item query device further includes: a sending unit; a receiving unit, further configured to receive a version information query request from a user device; the version information query request includes the current version number of the target work item; a query unit, further configured to query the parent version number of the current version number from a first mapping relationship based on the current version number, until the initial version number of the target work item is found, so as to obtain the version information of the target work item; the version information includes all version numbers of the target work item and the parent-child relationship between two adjacent version numbers; and a sending unit, configured to send the version information of the target work item to the user device so that the user device displays the version information of the target work item.

[0011] In one possible implementation, the above-mentioned work item query device further includes: a generation unit, an update unit, and a comparison unit; a receiving unit, further configured to receive a work item modification request sent by a user equipment; the work item modification request includes an identifier of the target work item and a modification field; the modification field includes a field name to be modified and a field value of the field name to be modified; a generation unit, configured to generate an update version number of the modification field; an update unit, configured to update a first mapping relationship based on the update version number and the identifier of the target work item; in the updated first mapping relationship, the current version of the target work item is the update version number, and the parent version number of the update version number is the current version number of the target work item before the update; The comparison unit is used to compare the modified field with the parent version field to obtain the first field name, the second field name, and the field value of the second field name; the parent version field is the content of the parent version of the updated version number; the first field name is the field name whose field name and field value are the same as those in the modified field and the parent version field; the second field name is the field name whose field name or field value is different from those in the modified field and the parent version field; the update unit is also used to update the third mapping relationship based on the second field name and the field value of the second field name; the update unit is also used to update the second mapping relationship based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the updated version number.

[0012] In one possible implementation, the above-mentioned work item query device further includes: a receiving unit, which is further configured to receive a work item recovery request sent by a user equipment; the work item recovery request includes an identifier of a target work item and a version number to be recovered; and an updating unit, which is further configured to update the version number to be recovered to the current version number of the target work item if a version number to be recovered exists in the first mapping relationship, and to update the first mapping relationship and the second mapping relationship based on the version number to be recovered.

[0013] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the first aspect described above and any possible implementation thereof.

[0014] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the methods of the first aspect and any possible implementation thereof.

[0015] According to a fifth aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.

[0016] The technical solution of the first aspect provided by the embodiments of this application brings at least the following beneficial effects: After receiving a work item query request sent by a user equipment, the target version identifier corresponding to the target version number of the target work item can be queried from the first mapping relationship according to the identifier and target version number of the target work item, and the target field identifier can be queried from the second mapping relationship according to the target version identifier; further, the field name and field value of the target work item corresponding to the target version number can be queried from the third mapping relationship according to the target field identifier. In this way, by pre-establishing three mapping relationship tables, the identifier, version number, version identifier, field identifier, field name, and field value of the work item can be associated, so that the field name and field value corresponding to the target version number of the target work item can be queried based on the identifier and target version number of the target work item, thereby enabling the query of work items based on version number.

[0017] It should be noted that the technical effects of any of the implementation methods in aspects two through five can be found in the technical effects of the corresponding implementation methods in aspect one, and will not be repeated here.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.

[0020] Figure 1 This is a schematic diagram illustrating the structure of a work item query system according to an exemplary embodiment;

[0021] Figure 2 This is a flowchart illustrating a work item query method according to an exemplary embodiment;

[0022] Figure 3 This is a flowchart illustrating yet another work item query method according to an exemplary embodiment;

[0023] Figure 4 This is a flowchart illustrating yet another work item query method according to an exemplary embodiment;

[0024] Figure 5 This is a flowchart illustrating yet another work item query method according to an exemplary embodiment;

[0025] Figure 6 This is a block diagram illustrating a work item query device according to an exemplary embodiment;

[0026] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0027] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0028] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0029] Before providing a detailed introduction to the work item query method provided in this application, let's first briefly introduce the implementation environment (implementation architecture) involved in this application.

[0030] The work item query method provided in this application embodiment can be applied to a work item query system. Figure 1 A schematic diagram of one structure of this work item query system is shown. For example... Figure 1 As shown, the work item query system 10 includes a work item query device 11 and an electronic device 12. The work item query device 11 is connected to the electronic device 12. The work item query device 11 and the electronic device 12 can be connected by wired or wireless means, and this embodiment does not limit the connection.

[0031] The work item query device 11 can be used to interact with the electronic device 12, for example, to obtain a work item query request from the electronic device 12, which includes the identifier of the target work item and the target version number.

[0032] Furthermore, the work item query device 11 is also used to query the target version identifier corresponding to the target version number of the target work item from the first mapping relationship based on the identifier and target version number of the target work item; the first mapping relationship includes the identifier, version identifier and version number of different work items.

[0033] The work item query device 11 is also used to query the target field identifier from the second mapping relationship based on the target version identifier; the second mapping relationship includes one or more field identifiers corresponding to different version identifiers.

[0034] The work item query device 11 is also used to query the field name and field value corresponding to the target version number of the target work item from the third mapping relationship according to the target field identifier; the third mapping relationship includes the field name and field value corresponding to different field identifiers.

[0035] Electronic device 12 can be used to interact with work item query device 11. For example, after receiving a work item query request sent by user device, electronic device 12 can send a work item query request to work item query device 11, and receive the field name and field value of the target work item corresponding to the target version number sent by work item query device 11, and send the field name and field value of the target work item corresponding to the target version number to user device.

[0036] Optionally, both the work item query device 11 and the electronic device 12 can be physical machines, such as desktop computers, mobile phones, tablets, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other terminal devices. The electronic device 12 can also be a server, or a server cluster composed of multiple servers.

[0037] Optionally, the work item query device 11 described above can also implement the functions to be performed by a virtual machine (VM) deployed on a physical machine.

[0038] It should be noted that the work item query device 11 and the electronic device 12 can be independent devices or integrated into the same device; this application does not make any specific limitation in this regard.

[0039] When the work item query device 11 and the electronic device 12 are integrated into the same device, the communication method between the work item query device 11 and the electronic device 12 is the same as the communication method between internal modules of the device. In this case, the communication process between the two is the same as the communication process between the work item query device 11 and the electronic device 12 when they are independent of each other.

[0040] In the following embodiments provided in this application, the work item query device 11 and the electronic device 12 are described as being set up independently of each other.

[0041] For ease of understanding, the following section provides a detailed description of the work item query method provided in this application, in conjunction with the accompanying drawings.

[0042] Figure 2 This is a flowchart illustrating a work item query method according to an exemplary embodiment. This method can be applied to an electronic device or a work item query device connected to an electronic device. Furthermore, this method can also be applied to devices similar to electronic devices or work item query devices. The following description uses the application of this method to an electronic device as an example to illustrate the method. Figure 2 As shown, this work item query method includes the following steps:

[0043] S201. The electronic device receives a work item query request sent by the user equipment.

[0044] The work item query request includes the identifier of the target work item and the target version number; the work item query request is used to request the field name and field value of the target work item corresponding to the target version number.

[0045] In one possible implementation, the user equipment, in response to the user's input of the identifier and target version number of the target work item, generates a work item query request and sends the work item query request to the electronic device. Correspondingly, the electronic device receives the work item query request sent by the user equipment.

[0046] It should be noted that the target version number can be the current version number of the target work item, or any one of the version numbers of the target work item specified by the user.

[0047] When a user enters only the identifier of the target work item in the user device, the user device queries the current version number of the target work item from the electronic device and generates the above work item query request based on the identifier and the current version number of the target work item.

[0048] In another scenario, the user equipment can obtain and display all version numbers of the target work item from the electronic device. Further, in response to the user's selection of the target version number from the total version numbers, the user equipment determines the target version number and generates the aforementioned work item query request based on the identifier of the target work item and its current version number.

[0049] In practical applications, the field names and values ​​corresponding to the target version number of the above target work item can be information such as the description of the work content of the target work item version number, the person in charge, the estimated working time and the completion time.

[0050] For example, the field names and values ​​for any version number of a work item can be as follows:

[0051] Field name: Work step 1; Field value: abc.

[0052] Field name: Work step 2; Field value: ab.

[0053] Field name: Person in charge; Field value: A.

[0054] Field name: Completion time; Field value: Year xx Month xx Day.

[0055] S202. The electronic device queries the first mapping relationship for the target version identifier corresponding to the target version number of the target work item, based on the identifier and target version number of the target work item.

[0056] The first mapping relationship includes the identifier, version identifier, and version number of different work items; the target version identifier corresponding to the target version number of the target work item is used to determine the version of the work item among all work items.

[0057] As one possible implementation, the electronic device responds to a work item query request by querying a first target mapping relationship, which includes the identifier of the target work item and the target version number, from a first mapping relationship based on the identifier of the target work item and the target version number, and obtains the target version identifier from the first target mapping relationship;

[0058] It should be noted that the first mapping relationship includes multiple first correspondences, each of which includes an identifier for a work item, a version number, and the version identifier corresponding to that version number. The first mapping relationship may include identifiers for multiple different work items, and version identifiers corresponding to different version numbers of each work item.

[0059] For example, the first mapping relationship can be shown in Table 1 below:

[0060] Table 1 First Mapping Relationship

[0061] Work item identifier Version number Version identifier Work Item 1 V1 01 Work Item 1 V2 02 Work Item 1 V3 03 Work Item 2 V1 04 Work Item 2 V2 05

[0062] As shown in Table 1 above, for the same work item 1, there are different version numbers V1, V2 and V3. The version identifier of version number V1 is 01, the version identifier of version number V2 is 02 and the version identifier of version number V3 is 03. For the same work item 2, there are different version numbers V1 and V2. The version identifier of version number V1 is 04 and the version identifier of version number V2 is 05.

[0063] In practical applications, when a user creates a new work item on a user device, the user device sends a work item creation message to the electronic device. Upon receiving the work item creation message, the electronic device assigns an initial version number to the work item and generates an initial version identifier for that initial version number. Based on the work item identifier, the initial version number, and the initial version identifier corresponding to the initial version number, the electronic device generates a first mapping relationship. Further, the electronic device updates this first mapping relationship to the first mapping relationship.

[0064] S203. The electronic device queries the target field identifier from the second mapping relationship based on the target version identifier.

[0065] The second mapping relationship includes one or more field identifiers corresponding to different version identifiers and the target version identifier corresponding to the target version number of the target work item; the one or more field identifiers corresponding to different version identifiers are used to identify any field in any version of any work item.

[0066] In one possible implementation, the electronic device, in response to the obtained target version identifier, queries a second target correspondence including the target version identifier from a plurality of second correspondences included in the second mapping relationship, and obtains the target field identifier from the second target correspondence.

[0067] It should be noted that the second mapping relationship includes multiple second correspondences, and each second correspondence includes a version identifier of a work item and the field identifier corresponding to that version identifier.

[0068] For example, the second mapping relationship can be shown in Table 2 below:

[0069] Table 2 Second Mapping Relationship

[0070] Version identifier Field identifier 01 001、002 02 003、004

[0071] As shown in Table 2 above, for version identifier 01, there are different field identifiers 001 and 002; for version identifier 02, there are different field identifiers 003 and 004.

[0072] In practical applications, when a user creates a new work item on a user device, the user device sends a work item creation message to the electronic device. Upon receiving the work item creation message, the electronic device retrieves the fields (including field names and values) of the work item from the message and assigns an initial field identifier to each field. Further, based on this initial field identifier and the initial version identifier assigned to the work item, the electronic device generates a second mapping relationship. Finally, the electronic device updates this second mapping relationship to the second mapping relationship.

[0073] S204. The electronic device queries the third mapping relationship for the field name and field value corresponding to the target version number of the target work item based on the target field identifier.

[0074] The third mapping relationship includes the field identifier and the corresponding field name and field value.

[0075] As one possible implementation, the electronic device responds to the target field identifier corresponding to the obtained target version identifier, queries the third target mapping relationship including the target field identifier from the third mapping relationship based on the target field identifier, and obtains the field name and field value of the target work item corresponding to the target version number from the third target mapping relationship.

[0076] It should be noted that the third mapping relationship includes multiple third correspondences, and each third correspondence includes a field identifier, as well as the field name and field value corresponding to the field identifier.

[0077] For example, the third mapping relationship can be shown in Table 3 below:

[0078] Table 3 Third Mapping Relationship

[0079] Field identifier field name Field value 001 Work Step 1 abc 002 Work Step 2 ab 003 person in charge A 004 Completion Time [Date]

[0080] As shown in Table 3 above, the third mapping relationship can include different field identifiers 001, 002, 003 and 004; among them, the field name corresponding to field identifier 001 is work step 1, and the field value is abc; the field name corresponding to field identifier 002 is work step 2, and the field value is ab; the field name corresponding to field identifier 003 is the person in charge, and the field value is A; the field name corresponding to field identifier 004 is completion time, and the field value is xx year xx month xx day.

[0081] In practical applications, the electronic device retrieves the fields of the work item from the work item creation message, assigns initial field identifiers to the fields of the work item, and then generates a third-party mapping relationship based on the fields of the work item (including field names and field values) and the initial field identifiers. Furthermore, the electronic device updates this third-party mapping relationship to the third mapping relationship.

[0082] Understandably, the technical solution provided in this application, after receiving a work item query request sent by a user equipment, can query the target version identifier corresponding to the target version number of the target work item from the first mapping relationship based on the identifier and target version number of the target work item, and query the target field identifier from the second mapping relationship based on the target version identifier; further, it can query the field name and field value of the target work item corresponding to the target version number from the third mapping relationship based on the target field identifier. In this way, by pre-establishing three mapping relationship tables, the identifier, version number, version identifier, field identifier, field name, and field value of the work item can be associated. This allows for querying the field name and field value corresponding to the target version number of the target work item based on the identifier and target version number of the target work item, thereby enabling querying of work items based on version number.

[0083] In some embodiments, to more conveniently display version information of the target work item to the user device, such as Figure 3 As shown in the embodiments of this application, the work item query method further includes the following steps:

[0084] S301. The electronic device receives a version information query request from the user device.

[0085] The version information query request includes the current version number of the target work item, and is used to request the version information of the target work item.

[0086] In one possible implementation, in response to a user inputting the current version number of a target work item, the user equipment generates a target work item version information query request and sends it to the electronic device. Correspondingly, the electronic device receives the target work item version information query request sent by the user equipment.

[0087] S302. The electronic device queries the parent version number of the current version number from the first mapping relationship according to the current version number, until the initial version number of the target work item is found, so as to obtain the version information of the target work item.

[0088] The first mapping relationship also includes the parent version number of each version number; the version information of the target work item includes all version numbers of the target work item and the parent-child relationship between two adjacent version numbers.

[0089] In one possible implementation, the electronic device responds to a target work item version information query request, queries a first mapping relationship including the current version number of the target work item from a first mapping relationship based on the current version number in the work item version information query request, and obtains the parent version number of the current version number of the target work item from the first mapping relationship including the current version number; further, the electronic device queries the parent version number of the parent version number from the first mapping relationship based on the parent version number until the initial version number of the target work item is found, so as to obtain the version information of the target work item.

[0090] It should be noted that the parent version number of the current version number is the version number before the current version number was updated. In the first mapping relationship, the initial version number of each work item does not have a parent version number.

[0091] For example, the first mapping relationship can be shown in Table 4 below:

[0092] Table 4 First Mapping Relationship

[0093] Work item identifier Version number Version identifier Parent version number Work Item 1 V1 01 - Work Item 1 V2 02 V1 Work Item 1 V3 03 V2 Work Item 2 V1 04 - Work Item 2 V2 05 V1

[0094] As shown in Table 4 above, for the same work item 1, work item 1 has different version numbers V1, V2 and V3. Among them, the version identifier of version number V1 is 01 and there is no parent version number; the version identifier of version number V2 is 02 and the parent version number is V1; the version identifier of version number V3 is 03 and the parent version number is V2. For the same work item 2, work item 2 has different version numbers V1 and V2. Among them, the version identifier of version number V1 is 04 and there is no parent version number; the version identifier of version number V2 is 05 and the parent version number is V1.

[0095] S303. The electronic device sends the version information of the target work item to the user equipment so that the user equipment can display the version information of the target work item.

[0096] As one possible implementation, after receiving the version information of the target work item, the electronic device sends the version information of the target work item to the user device, enabling the user device to display the version information of the target work item.

[0097] Understandably, this application receives a version information query request from a user device, uses the current version number in the query request, and then queries the parent version number of the current version number from the first mapping relationship until the initial version number of the target work item is found, thus obtaining all version numbers of the target work item and the parent-child relationship between adjacent version numbers. In this way, by chaining the parent version number of the target work item's version number in the first mapping relationship, the version information of the target work item can be obtained, and all version numbers of the target work item and the parent-child relationship between adjacent version numbers can be displayed, helping users to intuitively understand the version information of the target work item.

[0098] In some embodiments, in order to enable the user equipment to modify the content of the target work item, such as Figure 4 As shown in the embodiments of this application, the work item query method further includes the following steps:

[0099] S401. The electronic device receives a work item modification request sent by the user equipment.

[0100] The work item modification request includes the identifier of the target work item and the modified fields; the modified fields include the field name to be modified and the field value of the field name to be modified.

[0101] In one possible implementation, the user equipment, in response to the user's input operation of modifying the field name and field value of the target work item, generates a work item modification request and sends the work item modification request to the electronic device; correspondingly, the electronic device receives the request to modify the field name and field value of the target work item.

[0102] It should be noted that the instruction to modify messages sent by the user equipment include the field names and / or field values ​​of the target work item.

[0103] S402. Electronic devices generate update version numbers for modified fields.

[0104] As one possible implementation, in response to a work item modification request, the electronic device assigns a new update version number to the modified field, which is different from the existing version number of the target work item.

[0105] S403. The electronic device updates the first mapping relationship based on the updated version number and the identifier of the target work item.

[0106] In the updated first mapping relationship, the current version number of the target work item is the updated version number, and the parent version number of the updated version number is the current version number of the target work item before the update.

[0107] As one possible implementation, the electronic device assigns a version identifier to the update version number, generates a new first correspondence based on the identifier of the target work item, the update version number, the version identifier of the update version number, and the parent version number of the update version number, and updates the first mapping relationship to the first mapping relationship.

[0108] The aforementioned new first correspondence includes the identifier of the target work item, the update version number, the version identifier of the update version number, and the parent version number of the update version number.

[0109] It should be noted that the current version number in the first mapping relationship does not have a child version number. For example, referring to Table 4, the version number V3 of work item 1 in Table 4 is not used as the parent version number of any other version number, that is, version number V3 does not have a child version number, so version number V3 is the current version number of work item 1.

[0110] S404. The electronic device compares the modified field with the parent version field to obtain the first field name, the second field name, and the field value of the second field name.

[0111] Among them, the parent version field is the content of the parent version of the updated version number; the first field name is the same as the field name and field value in both the modified field and the parent version field; the second field name is the field name that is different from the field name or field value in both the modified field and the parent version field.

[0112] As one possible implementation, the electronic device compares each field name in the modified field with all field names in the parent version field, and compares the modified field with the field value of the same field name in the parent version field.

[0113] If there is any field in the parent version that has the same field name and field value, the electronic device will identify that field as the first field and the field name of that field as the first field name.

[0114] If the parent version field and the modified field have the same field name, but the corresponding field value is different, the electronic device will identify that field name as the second field name.

[0115] If the field name in the modified field value is different from all field names in the parent version, the electronic device will identify that field name as the second field name.

[0116] S405. The electronic device updates the third mapping relationship based on the second field name and the field value of the second field name.

[0117] As one possible implementation, the electronic device assigns a new field identifier to the second field name and the field value of the second field name, and updates the identifier of the second field name, the second field name, and the field value of the second field name to the third mapping relationship.

[0118] S406. The electronic device updates the second mapping relationship based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number.

[0119] As one possible implementation, the electronic device generates a new second correspondence based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number, and updates the second correspondence to the second mapping relationship.

[0120] The new second correspondence includes the version identifier of the updated version number, the field identifier of the first field name, and the field identifier of the second field name.

[0121] As is understood, the technical solution provided in this application updates the first mapping relationship, the second mapping relationship, and the third mapping relationship respectively according to the content of the work item modification request after receiving the work item modification request sent by the user equipment. This provides a method for updating the above three mapping relationships, ensuring the accuracy of the above three mapping relationships in real time.

[0122] Meanwhile, by comparing the modified field with the parent version field, only the required second field name and field value are added to the third mapping relationship. This avoids storing the same field name and field value for different version numbers in the third mapping relationship, thus preventing redundant data in the third mapping relationship.

[0123] In some embodiments, in order to enable the user equipment to recover the contents of the target work item, such as Figure 5 As shown in the embodiments of this application, the work item query method further includes the following steps:

[0124] S501, The electronic device receives a work item recovery request sent by the user equipment.

[0125] The work item recovery request includes the identifier of the target work item and the version number to be recovered; the work item recovery request is used to recover the version of the work item.

[0126] In one possible implementation, the user equipment, in response to the user's input of the identifier of the target work item and the version number to be restored, generates a work item recovery request and sends the work item recovery request to the electronic device; correspondingly, the electronic device receives the work item recovery request sent by the user equipment.

[0127] It should be noted that the version number to be restored can be any one of the version numbers of the target work item specified by the user.

[0128] S502. If the electronic device has a version number to be recovered in the first mapping relationship, the version number to be recovered shall be updated to the current version number of the target work item.

[0129] As one possible implementation, in response to a work item recovery request, the electronic device determines whether there is a version number of the target work item to be recovered in the first mapping relationship. If there is a version number to be recovered in the first mapping relationship, the version number to be recovered is updated to the current version number of the target work item.

[0130] It should be noted that if the version number to be restored does not exist in the first mapping relationship, the electronic device sends a recovery error message to the user device.

[0131] S503. The electronic device updates the first mapping relationship and the second mapping relationship based on the version number to be restored.

[0132] As one possible implementation, in response to a work item recovery request, the electronic device updates the version number to be recovered to the current version number of the target work item, and then updates the first mapping relationship and the second mapping relationship based on the current version number of the target work item.

[0133] It should be noted that the implementation method of updating the first mapping relationship based on the current version number of the electronic device can refer to the description of S402-S403 above in the embodiments of this application, and will not be repeated here. Similarly, the implementation method of updating the first mapping relationship based on the current version number can refer to the description of S404-S406 above in the embodiments of this application, and will not be repeated here. It is understood that the technical solution provided in the embodiments of this application, after receiving a work item recovery request sent by the user equipment, determines whether there is a version number to be recovered in the first mapping relationship, and then updates the version number to be recovered to the current version number of the target version number. Furthermore, the first mapping relationship and the second mapping relationship are updated based on the version number to be recovered. In this way, the version recovery function of the target work item can be realized.

[0134] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the work item query device or electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0135] This application embodiment can, based on the above method, exemplarily divide a work item query device or electronic device into functional modules. For example, the work item query device or electronic device may include functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0136] For example, embodiments of this application also provide a work item query device.

[0137] In some embodiments, Figure 6 This is a block diagram illustrating a job item query device according to an exemplary embodiment. (Refer to...) Figure 6 The work item query device 600 includes a receiving unit 601 and a query unit 602.

[0138] The receiving unit 601 is used to receive a work item query request sent by the user equipment; the work item query request includes the identifier of the target work item and the target version number.

[0139] The query unit 602 is used to query the target version identifier corresponding to the target version number of the target work item from the first mapping relationship based on the identifier and target version number of the target work item; the first mapping relationship includes the identifier, version identifier and version number of different work items.

[0140] The query unit 602 is also used to query the target field identifier from the second mapping relationship based on the target version identifier; the second mapping relationship includes one or more field identifiers corresponding to different version identifiers.

[0141] The query unit 602 is also used to query the field name and field value corresponding to the target version number of the target work item from the third mapping relationship based on the target field identifier; the third mapping relationship includes the field name and field value corresponding to different field identifiers.

[0142] Optional, such as Figure 6 As shown, the work item query device 600 provided in this application embodiment further includes: a sending unit 603; and a receiving unit 601, which is further configured to receive a version information query request from a user device; the version information query request includes the current version number of the target work item.

[0143] The query unit 602 is also used to query the parent version number of the current version number from the first mapping relationship based on the current version number, until the initial version number of the target work item is found, so as to obtain the version information of the target work item; the version information includes all version numbers of the target work item and the parent-child relationship between two adjacent version numbers.

[0144] The sending unit 603 is used to send the version information of the target work item to the user equipment so that the user equipment can display the version information of the target work item.

[0145] Optional, such as Figure 6 As shown, the work item query device 600 provided in this application embodiment further includes: a generation unit 604, an update unit 605, and a comparison unit 606.

[0146] The receiving unit 601 is also used to receive a work item modification request sent by the user equipment; the work item modification request includes the identifier of the target work item and the modification field; the modification field includes the field name to be modified and the field value of the field name to be modified.

[0147] Generation unit 604 is used to generate the update version number of the modified field.

[0148] Update unit 605 is used to update the first mapping relationship based on the update version number and the identifier of the target work item; in the updated first mapping relationship, the current version of the target work item is the update version number, and the parent version number of the update version number is the current version number of the target work item before the update.

[0149] Comparison unit 606 is used to compare the modified field with the parent version field to obtain the first field name, the second field name, and the field value of the second field name; the parent version field is the content of the parent version of the updated version number; the first field name is the field name in which both the field name and field value are the same in the modified field and the parent version field; the second field name is the field name in which either the field name or field value is different in the modified field and the parent version field.

[0150] Update unit 605 is also used to update the third mapping relationship based on the second field name and the field value of the second field name. Update unit 605 is also used to update the second mapping relationship based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number.

[0151] Optionally, the receiving unit 601 is further configured to receive a work item recovery request sent by the user equipment; the work item recovery request includes the identifier of the target work item and the version number to be recovered.

[0152] The update unit 605 is also used to update the version number to be recovered to the current version number of the target work item if there is a version number to be recovered in the first mapping relationship, and to update the first mapping relationship and the second mapping relationship based on the version number to be recovered.

[0153] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0154] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 7 As shown, the electronic device 700 includes, but is not limited to, a processor 701 and a memory 702.

[0155] The memory 702 described above is used to store the executable instructions of the processor 701. It is understood that the processor 701 is configured to execute instructions to implement the work item query method in the above embodiments.

[0156] It should be noted that those skilled in the art will understand that Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device; the electronic device may include, but is not limited to, other electronic devices. Figure 7 This may indicate more or fewer components, or a combination of certain components, or a different arrangement of components.

[0157] Processor 701 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in memory 702, and by calling data stored in memory 702, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Processor 701 may include one or more processing units. Optionally, processor 701 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 701.

[0158] The memory 702 can be used to store software programs and various data. The memory 702 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, application programs required by at least one functional module (such as a determination unit, processing unit, etc.), etc. Furthermore, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0159] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 702 including instructions, which can be executed by a processor 701 of an electronic device 700 to implement the work item query method in the above embodiments.

[0160] In actual implementation, Figure 6 The functions of the receiving unit 601, querying unit 602, sending unit 603, generating unit 604, updating unit 605, and comparing unit 606 can all be provided by... Figure 7 The processor 701 calls the computer program stored in the memory 702 to implement the process. The specific execution process can be found in the description of the work item query method in the previous embodiment, and will not be repeated here.

[0161] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0162] In an exemplary embodiment, this application also provides a computer program product including one or more instructions, which can be executed by the processor 701 of an electronic device to complete the work item query method in the above embodiments.

[0163] It should be noted that when one or more instructions in the computer-readable storage medium or computer program product are executed by the processor of the electronic device, they implement the various processes of the above-described work item query method embodiment and achieve the same technical effect as the above-described work item query method. To avoid repetition, they will not be described again here.

[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0165] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0166] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the classified units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0167] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0168] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, essentially, or the part that contributes to the prior art, or a complete or partial classification of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0169] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for querying work items, characterized in that, include: Receive work item query requests sent by user equipment; The work item query request includes the identifier of the target work item and the target version number; Based on the identifier and target version number of the target work item, query the target version identifier corresponding to the target version number of the target work item from the first mapping relationship; the first mapping relationship includes the identifier, version identifier and version number of different work items; Based on the target version identifier, query the target field identifier from the second mapping relationship; the second mapping relationship includes one or more field identifiers corresponding to different version identifiers. Based on the target field identifier, query the field name and field value corresponding to the target version number of the target work item from the third mapping relationship; the third mapping relationship includes the field name and field value corresponding to different field identifiers; Receive a work item modification request sent by the user equipment; the work item modification request includes the identifier of the target work item and a modification field; the modification field includes the field name to be modified and the field value of the field name to be modified; Generate the update version number of the modified field; Update the first mapping relationship based on the update version number and the identifier of the target work item; The first mapping relationship also includes the parent version number of each version number; In the updated first mapping relationship, the current version number of the target work item is the updated version number, and the parent version number of the updated version number is the current version number of the target work item before the update; The modified field is compared with the parent version field to obtain the first field name, the second field name, and the field value of the second field name; the parent version field is the content of the parent version of the updated version number; the first field name is the field name in which both the field name and field value are the same in the modified field and the parent version field; the second field name is the field name in which either the field name or field value is different in the modified field and the parent version field. Update the third mapping relationship based on the second field name and the field value of the second field name; Update the second mapping relationship based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number.

2. The work item query method according to claim 1, characterized in that, The method further includes: Receive a version information query request from the user equipment; the version information query request includes the current version number of the target work item; Based on the current version number, the parent version number of the current version number is queried from the first mapping relationship until the initial version number of the target work item is found, so as to obtain the version information of the target work item; the version information includes all version numbers of the target work item and the parent-child relationship between two adjacent version numbers; The version information of the target work item is sent to the user equipment so that the user equipment displays the version information of the target work item.

3. The work item query method according to any one of claims 1-2, characterized in that, The method further includes: Receive a work item recovery request sent by the user equipment; the work item recovery request includes the identifier of the target work item and the version number to be recovered; If the version number to be recovered exists in the first mapping relationship, the version number to be recovered is updated to the current version number of the target work item, and the first mapping relationship and the second mapping relationship are updated based on the version number to be recovered.

4. A work item query device, characterized in that, It includes a receiving unit, a querying unit, a generating unit, an updating unit, and a comparison unit; The receiving unit is configured to receive a work item query request sent by the user equipment; the work item query request includes the identifier of the target work item and the target version number; The query unit is configured to query a target version identifier corresponding to the target version number of the target work item from a first mapping relationship based on the identifier and target version number of the target work item; the first mapping relationship includes the identifier, version identifier and version number of different work items; The query unit is further configured to query a target field identifier from the second mapping relationship based on the target version identifier; the second mapping relationship includes one or more field identifiers corresponding to different version identifiers; The query unit is further configured to query the field name and field value corresponding to the target version number of the target work item from the third mapping relationship based on the target field identifier; the third mapping relationship includes the field name and field value corresponding to different field identifiers; The receiving unit is further configured to receive a work item modification request sent by the user equipment; the work item modification request includes the identifier of the target work item and a modification field; the modification field includes the field name to be modified and the field value of the field name to be modified; The generation unit is used to generate the update version number of the modified field; The update unit is used to update the first mapping relationship based on the update version number and the identifier of the target work item; The first mapping relationship also includes the parent version number of each version number; in the updated first mapping relationship, the current version of the target work item is the updated version number, and the parent version number of the updated version number is the current version number of the target work item before the update. The comparison unit is used to compare the modified field with the parent version field to obtain a first field name, a second field name, and a field value for the second field name; the parent version field is the content of the parent version of the updated version number; the first field name is the field name in which both the field name and field value are the same in the modified field and the parent version field; the second field name is the field name in which either the field name or field value is different in the modified field and the parent version field. The update unit is further configured to update the third mapping relationship based on the second field name and the field value of the second field name; The update unit is further configured to update the second mapping relationship based on the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number.

5. The work item query device according to claim 4, characterized in that, The work item query device also includes a sending unit; The receiving unit is further configured to receive a version information query request from the user equipment; the version information query request includes the current version number of the target work item; The query unit is further configured to query the parent version number of the current version number from the first mapping relationship based on the current version number, until the initial version number of the target work item is found, so as to obtain the version information of the target work item; The version information includes all version numbers of the target work item and the parent-child relationship between two adjacent version numbers; The sending unit is configured to send the version information of the target work item to the user equipment, so that the user equipment displays the version information of the target work item.

6. The work item query device according to any one of claims 4-5, characterized in that, The receiving unit is further configured to receive a work item recovery request sent by the user equipment; the work item recovery request includes the identifier of the target work item and the version number to be recovered; The update unit is further configured to update the version number to be recovered to the current version number of the target work item if the version number to be recovered exists in the first mapping relationship, and to update the first mapping relationship and the second mapping relationship based on the version number to be recovered.

7. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that, When the computer-executable instructions stored in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is capable of performing the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data query method and device, equipment, storage medium and program product

    CN113127452A

  • Method and system for tracking of work-item revisions

    US20060173879A1