CN116506506A - Service dynamic change method, device, computer equipment and storage medium - Google Patents
Service dynamic change method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN116506506A CN116506506A CN202310537462.6A CN202310537462A CN116506506A CN 116506506 A CN116506506 A CN 116506506A CN 202310537462 A CN202310537462 A CN 202310537462A CN 116506506 A CN116506506 A CN 116506506A
- Authority
- CN
- China
- Prior art keywords
- sequence
- service
- service sequence
- historical
- elements
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000008859 change Effects 0.000 title claims abstract description 13
- 238000004590 computer program Methods 0.000 claims abstract description 41
- 230000008569 process Effects 0.000 abstract description 6
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
The application relates to a method, an apparatus, a computer device, a storage medium and a computer program product for dynamic service change. The method comprises the following steps: acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence; when the service state in the history service sequence is a completed element, taking the element with the service state being completed as a first element, and inquiring the first service sequence based on the first element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence; and acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence. The method can store the elements which have completed the service execution and the updated sequence together, and can reduce the computer resources consumed in the sequence updating process 。
Description
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for dynamically changing a service.
Background
When the service is configured in the service scene, when the service node sequence is updated (node sequence, newly added node and deleted node) to generate a new sequence, the node sequence (old sequence) in the process of the service needs to be reasonably adjusted according to the sequence updated by the service node, so that the update of the service node sequence is completed.
In the conventional technology, a new sequence is re-established for service processing after a service is changed, and the node sequence to be changed is generally directly abandoned.
However, the event that the service processing has been performed on the old sequence in the conventional technology is not compatible with the new sequence, the new sequence and the old sequence are completely independent, and with the arrival of the big data age, a great deal of waste of calculation and storage resources is easy to occur.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a business dynamic change method, apparatus, computer device, computer readable storage medium, and computer program product that can reduce computing and storage resources.
In a first aspect, the present application provides a method for dynamically changing a service. The method comprises the following steps:
acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence;
When the service state in the history service sequence is a completed element, taking the element with the service state being completed as a first element, and inquiring the first service sequence based on the first element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence;
and acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence.
In one embodiment, when the first element does not exist in the first service sequence, adding the first element to the first service sequence to obtain a second service sequence includes:
when adjacent second elements exist before the first element, acquiring the adjacent previous second element of the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical service sequence and the first service sequence;
and merging the first element into the first service sequence based on the second element adjacent to the previous first element to obtain a second service sequence.
In one embodiment, when the first element does not exist in the first service sequence, adding the first element to the first service sequence to obtain a second service sequence includes:
When no adjacent second element exists before the first element, the first element is added to the first element of the first service sequence, and the second service sequence is obtained; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
In one embodiment, querying the first traffic sequence based on the first element includes:
acquiring a node sequence of a first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence;
wherein the relationship between the first element and the first service sequence includes: the first element is absent from the first traffic sequence and the first element is present in the first traffic sequence.
In one embodiment, when the first element exists in the historical traffic sequence, the method further includes:
acquiring a plurality of third elements in a historical service sequence; the third element is an element with incomplete service state;
querying the first service sequence based on a plurality of third elements;
and deleting the third element when the third element does not exist in the first service sequence.
In one embodiment, the method further comprises:
And when the first element does not exist in the historical service sequence, the first service sequence is used as a second service sequence.
In a second aspect, the present application further provides a service dynamic changing device. The device comprises:
the data acquisition module is used for acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence;
the second service sequence determining module is used for inquiring the first service sequence based on the first element by taking the element with the completed service state as the first element when the service state is the completed element in the history service sequence; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence;
the service execution sequence determining module is used for acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer device readable storage medium. The computer device readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method according to any of the embodiments described above.
The method, the device, the computer equipment, the storage medium and the computer program product for dynamically changing the business are characterized in that firstly, a first business sequence, a historical business sequence and business states of elements in the historical business sequence are obtained. Then, when the service state in the history service sequence is the completed element, the service state is the completed element as a first element, and the first service sequence is inquired based on the first element; and when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence. Further, the arrangement sequence of the elements with unfinished service states in the second service sequence is obtained and is used as the service execution sequence. The service states of the elements in the historical service sequences are inquired, the elements with the completed service states are merged into the first service sequence to obtain the second service sequence, and then the elements with the incomplete service states in the second service sequence are subjected to service execution, so that the historical service execution history can be recorded and saved, the elements with the completed service execution can be stored together with the updated sequence, and the storage space consumed in the sequence updating process can be reduced.
Drawings
FIG. 1 is an application environment diagram of a business dynamic change method in one embodiment;
FIG. 2 is a flow chart of a method for dynamically changing services in one embodiment;
FIG. 3 is a block diagram of a business dynamic change device in one embodiment;
fig. 4 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The service dynamic change method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein, the service publishing terminal 102 communicates with the service terminal 104 through a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The service end 104 performs communication interaction with the service publishing end 102, so as to enter a service dynamic changing environment. First, the server 104 may obtain the first service sequence from the service publisher 102, obtain the historical service sequence from the database, and obtain the service status of each element in the historical service sequence. Then, when the service state is the completed element in the historical service sequence, the server 104 may query the first service sequence based on the first element by using the element whose service state is completed as the first element. Further, when the first element does not exist in the first service sequence, the server 104 may add the first element to the first service sequence to obtain the second service sequence. Finally, the server 104 may obtain the arrangement sequence of the elements whose service states are incomplete in the second service sequence, as the service execution sequence. The service publishing terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a service dynamic change method is provided, and the method is applied to a single-side implementation of a server side for illustration, and includes the following steps 202 to 206.
Step 202, acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence.
In this embodiment, the service states of the elements in the historical service sequence may include, but are not limited to: completed and not completed. Wherein, the service status being completed means that the service is not started to be executed or is being executed.
In this embodiment, the number of elements and the sequence of elements in the history service sequence are independent of the number of elements and the sequence of elements in the first service sequence.
In this embodiment, the service states of the elements in the first service sequence are all incomplete.
Step 204, when the service state is the completed element in the history service sequence, the completed element is used as the first element, and the first service sequence is queried based on the first element; and when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence.
In this embodiment, when the first element does not exist in the first service sequence, the server may acquire a position of the first element in the historical service sequence, and determine a joining position of the first element to join the first service sequence based on the position of the first element in the historical service sequence and the positions of the elements in the first service sequence. Further, based on the joining location, the first element is joined to the first traffic sequence to obtain a second traffic sequence.
Step 206, obtaining the arrangement sequence of the elements whose service states are incomplete in the second service sequence, as the service execution sequence.
In this embodiment, the service states of the plurality of elements in the second service sequence may include, but are not limited to: completed and not completed.
In this embodiment, the service end does not perform service execution on the elements whose service states are completed in the second service sequence, so that repeated execution of the same service can be avoided, and resource waste in the service execution process can be reduced.
In this embodiment, the service end performs service execution on the elements whose service states are incomplete in the second service sequence, where the sequence of service execution is consistent with the sequence of the second service sequence.
In the above method for dynamically changing services, first, a first service sequence, a historical service sequence, and service states of elements in the historical service sequence are obtained. Then, when the service state in the history service sequence is the completed element, the service state is the completed element as a first element, and the first service sequence is inquired based on the first element; and when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence. Further, the arrangement sequence of the elements with unfinished service states in the second service sequence is obtained and is used as the service execution sequence. The service states of the elements in the historical service sequences are inquired, the elements with the completed service states are merged into the first service sequence to obtain the second service sequence, and then the elements with the incomplete service states in the second service sequence are subjected to service execution, so that the historical service execution history can be recorded and saved, the elements with the completed service execution can be stored together with the updated sequence, and the storage space consumed in the sequence updating process can be reduced.
In some embodiments, querying the first traffic sequence based on the first element may include: acquiring a node sequence of a first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence; wherein the relationship between the first element and the first service sequence includes: the first element is absent from the first traffic sequence and the first element is present in the first traffic sequence.
In this embodiment, when a first element exists in the first service sequence, the service state of the same element in the first service sequence is never completed to be modified to be completed.
In this embodiment, when the first element does not exist in the first service sequence, the server may acquire a position of the first element in the historical service sequence, and determine a joining position of the first element to join the first service sequence based on the position of the first element in the historical service sequence and the positions of the elements in the first service sequence. Further, based on the joining location, the first element is joined to the first traffic sequence to obtain a second traffic sequence.
In some embodiments, when the first element does not exist in the first service sequence, adding the first element to the first service sequence to obtain the second service sequence may include: when adjacent second elements exist before the first element, acquiring the adjacent previous second element of the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical service sequence and the first service sequence; and merging the first element into the first service sequence based on the second element adjacent to the previous first element to obtain a second service sequence.
In this embodiment, when a first element does not exist in the first service sequence, the server may acquire a position of the first element in the historical service sequence, and when a plurality of second elements exist before the first element in the historical service sequence, acquire a second element adjacent to the first element in the historical service sequence, and query the first service sequence for a position of the second element. Further, the first element is added to the first traffic sequence after and adjacent to the second element based on the position of the second element in the first traffic sequence. Wherein, the second element adjacent to the first element in the history service sequence refers to the first element before the first element in the history service sequence. For example, when the historical traffic sequence is: 1,3,2,5,7, the first service sequence is: 1,3,6,7,8,5, when the service state of the element "2" in the history service sequence is completed, at this time, the element "2" in the history service sequence is a first element, the first element does not exist in the first service sequence, two second elements (respectively, "1" and "3") exist before the first element in the history service sequence, and the first second element "3" before the first element in the history service sequence is obtained. Further, the server may obtain the position of the second element in the first service sequence, and based on the position of the second element in the first service sequence, add the first element to the first service sequence after the second element is added and adjacent to the second element, so that the first service sequence (i.e. the second service sequence) to which the first element is added is: 1,3,2,6,7,8,5. And the service state of the first element in the second service sequence is unchanged and still completed.
In another embodiment, the server may obtain a node sequence of the first service sequence, traverse the first service sequence with a plurality of first elements according to the node sequence, determine a relationship between the first elements and the first service sequence, and determine whether to add the first elements to the first service sequence and add specific positions of the first service sequence based on the relationship between the first elements and the first service sequence. Therefore, when the first element does not exist in the first service sequence, other first elements may have been added in the first service sequence, the server may obtain a previous second element (intermediate element 1) adjacent to the first element in the history service sequence, and a previous first element (intermediate element 2) adjacent to the first element in the history service sequence, and the server may determine a position where the current first element is added to the first service sequence based on distances between the current first element and the intermediate element 1 and the intermediate element 2, respectively. Wherein, the previous first element adjacent to the first element in the history service sequence refers to the first element before the first element in the history service sequence. For example, when the historical traffic sequence is: 1,3,2,5,4,7, the first service sequence is: 1,3,6,7,8,5, the service states of the element "2" and the element "4" in the history service sequence are completed, when the current first element is the element "4", at this time, the element "2" and the element "4" in the history service sequence are the first element, and the service end has previously added the first element "2" to the first service sequence, and the first service sequence added with the first element "2" is: 1,3,2,6,7,8,5. Further, the first service sequence does not have the current first element "4", and three second elements (respectively, "1", "3", "5") and one first element "2" exist before the first element in the history service sequence, at this time, the server may obtain the first second element "5" (intermediate element 1) before the first element in the history service sequence and the first element "2" (intermediate element 2) before the first element in the history service sequence. Further, in the history service sequence, the distance between the current first element "4" and the middle element 1 is smaller than the distance between the first element "4" and the middle element 2, and the server may choose to add the current first element "4" to the first service sequence after the middle element 1 and adjacent to the middle element 1, so the first service sequence added with the first element "4" is as follows: 1,3,2,6,7,8,5,4. And the service state of the first element in the second service sequence is unchanged and still completed.
In this embodiment, when the last element in the history service sequence completes traversing the first service sequence according to the node sequence, the obtained second service sequence is the final second service sequence.
In some embodiments, when the first element does not exist in the first service sequence, adding the first element to the first service sequence to obtain the second service sequence may include: when no adjacent second element exists before the first element, the first element is added to the first element of the first service sequence, and the second service sequence is obtained; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
In this embodiment, when the first element does not exist in the first service sequence, the server may obtain the position of the first element in the historical service sequence, and when the first element in the historical service sequence is the first element, the first element is directly added to the first element of the first service sequence, so as to obtain the second service sequence.
In another embodiment, when the first element does not exist in the first service sequence, the server may acquire the position of the first element in the historical service sequence, when a plurality of elements exist before the first element in the historical service sequence, but when none of the plurality of elements exist before the first element in the historical service sequence in the first service sequence, the server may also directly add the first element to the first element in the first service sequence, to obtain the second service sequence.
In some embodiments, when the first element exists in the historical traffic sequence, the method may further include: acquiring a plurality of third elements in a historical service sequence; the third element is an element with incomplete service state; querying the first service sequence based on a plurality of third elements; and deleting the third element when the third element does not exist in the first service sequence.
In this embodiment, when the third element is not present in the first traffic sequence, the third element is ignored, i.e. not processed. For example, when the historical traffic sequence is: the first service sequences of 1,2,3 and 4 are as follows: 1,3,6, and when the first element "1", the third element "2", "3" and "4" exist in the history service sequence, the third element "3" exists in the first service sequence, and the third element "2" and "4" does not exist, so the third element "2" and "4" are ignored, and since the first element "1" exists in the first service sequence, the service end can directly modify the service state of the same element in the first service sequence from never completion to completed, and then the second service sequence is: 1,3,6, wherein the traffic state of element "1" is complete and the traffic states of element "3" and element "6" are incomplete.
In some embodiments, the above method may further comprise: and when the first element does not exist in the historical service sequence, the first service sequence is used as a second service sequence.
In this embodiment, when the service states of all the elements in the historical service sequence are incomplete, the server may directly use the first service sequence as the second service sequence without considering the elements in the historical service sequence, so as to save the operation of performing sequence processing on a plurality of elements in the first service sequence, and improve the speed of updating the service sequence.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a service dynamic changing device for realizing the service dynamic changing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the one or more service dynamic changing devices provided below may refer to the limitation of the service dynamic changing method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 3, there is provided a service dynamic changing apparatus, including: a data acquisition module 302, a second service sequence determination module 304, and a service execution order determination module 306, wherein:
the data acquisition module 302 is configured to acquire a first service sequence, a historical service sequence, and service states of elements in the historical service sequence.
A second service sequence determining module 304, configured to, when a service state is a completed element in the historical service sequence, query the first service sequence based on the first element by using the element whose service state is completed as the first element; and when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence.
The service execution sequence determining module 306 is configured to obtain, as the service execution sequence, an arrangement sequence of elements whose service states are incomplete in the second service sequence.
In one embodiment, the second service sequence determining module 304 may include:
a second element obtaining sub-module, configured to obtain, when an adjacent second element exists before the first element, an adjacent previous second element of the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
And the first merging sub-module is used for merging the first element into the first service sequence based on the adjacent previous second element of the first element to obtain a second service sequence.
In one embodiment, the second service sequence determining module 304 may include:
a second merging sub-module, configured to add the first element to the first element of the first service sequence to obtain a second service sequence when no adjacent second element exists before the first element; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
In one embodiment, the second service sequence determining module 304 may include:
The traversing sub-module is used for acquiring the node sequence of the first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence; wherein the relationship between the first element and the first service sequence includes: the first element is absent from the first traffic sequence and the first element is present in the first traffic sequence.
In one embodiment, when the first element exists in the historical service sequence, the apparatus may further include:
the third element acquisition module is used for acquiring a plurality of third elements in the historical service sequence; the third element is an element with incomplete service state.
And the query module is used for querying the first service sequence based on the plurality of third elements.
And the deleting module is used for deleting the third element when the third element does not exist in the first service sequence.
In one embodiment, the apparatus may further include:
and the replacing module is used for taking the first service sequence as the second service sequence when the first element does not exist in the historical service sequence.
The modules in the service dynamic change device can be realized in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer equipment is used for storing data such as historical service sequences and service states of all elements in the historical service sequences. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of dynamic change of traffic.
Those skilled in the art will appreciate that the structures shown in FIG. 4 are block diagrams only and do not constitute a limitation of the computer device on which the present aspects apply, and that a particular computer device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence; when the service state in the history service sequence is a completed element, taking the element with the service state being completed as a first element, and inquiring the first service sequence based on the first element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence; and acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence.
In one embodiment, the processor when executing the computer program further implements adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, resulting in a second traffic sequence, which may include: when adjacent second elements exist before the first element, acquiring the adjacent previous second element of the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical service sequence and the first service sequence; and merging the first element into the first service sequence based on the second element adjacent to the previous first element to obtain a second service sequence.
In one embodiment, the processor, when executing the computer program, further implements adding the first element to the first service sequence when the first element does not exist in the first service sequence, to obtain the second service sequence, and may include: when no adjacent second element exists before the first element, the first element is added to the first element of the first service sequence, and the second service sequence is obtained; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
In one embodiment, the processor, when executing the computer program, further performs querying the first service sequence based on the first element, may include: acquiring a node sequence of a first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence; wherein the relationship between the first element and the first service sequence includes: the first element is absent from the first traffic sequence and the first element is present in the first traffic sequence.
In one embodiment, when the first element is present in the historical traffic sequence, the processor may further implement the following steps when executing the computer program: acquiring a plurality of third elements in a historical service sequence; the third element is an element with incomplete service state; querying the first service sequence based on a plurality of third elements; and deleting the third element when the third element does not exist in the first service sequence.
In one embodiment, the following steps may also be implemented when the processor executes the computer program: and when the first element does not exist in the historical service sequence, the first service sequence is used as a second service sequence.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence; when the service state in the history service sequence is a completed element, taking the element with the service state being completed as a first element, and inquiring the first service sequence based on the first element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence; and acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence.
In one embodiment, the computer program when executed by the processor further implements adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, resulting in a second traffic sequence, which may include: when adjacent second elements exist before the first element, acquiring the adjacent previous second element of the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical service sequence and the first service sequence; and merging the first element into the first service sequence based on the second element adjacent to the previous first element to obtain a second service sequence.
In one embodiment, the computer program when executed by the processor further implements adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, resulting in a second traffic sequence, and may include: when no adjacent second element exists before the first element, the first element is added to the first element of the first service sequence, and the second service sequence is obtained; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
In one embodiment, the computer program when executed by the processor further implements querying the first traffic sequence based on the first element, may include: acquiring a node sequence of a first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence; wherein the relationship between the first element and the first service sequence includes: the first element is absent from the first traffic sequence and the first element is present in the first traffic sequence.
In one embodiment, when the first element is present in the historical traffic sequence, the computer program when executed by the processor may further implement the steps of: acquiring a plurality of third elements in a historical service sequence; the third element is an element with incomplete service state; querying the first service sequence based on a plurality of third elements; and deleting the third element when the third element does not exist in the first service sequence.
In one embodiment, the computer program when executed by the processor may further implement the steps of: and when the first element does not exist in the historical service sequence, the first service sequence is used as a second service sequence.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence; when the service state in the history service sequence is a completed element, taking the element with the service state being completed as a first element, and inquiring the first service sequence based on the first element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence; and acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence.
In one embodiment, the computer program when executed by the processor further implements adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, resulting in a second traffic sequence, which may include: when adjacent second elements exist before the first element, acquiring the adjacent previous second element of the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical service sequence and the first service sequence; and merging the first element into the first service sequence based on the second element adjacent to the previous first element to obtain a second service sequence.
In one embodiment, the computer program when executed by the processor further implements adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, resulting in a second traffic sequence, which may include: when no adjacent second element exists before the first element, the first element is added to the first element of the first service sequence, and the second service sequence is obtained; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
In one embodiment, the computer program, when executed by the processor, further implements querying the first traffic sequence based on the first element, may include: acquiring a node sequence of a first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence; wherein the relationship between the first element and the first service sequence includes: the first element is absent from the first traffic sequence and the first element is present in the first traffic sequence.
In one embodiment, when the first element is present in the historical traffic sequence, the computer program when executed by the processor may further implement the steps of: acquiring a plurality of third elements in a historical service sequence; the third element is an element with incomplete service state; querying the first service sequence based on a plurality of third elements; and deleting the third element when the third element does not exist in the first service sequence.
In one embodiment, the computer program when executed by the processor may further implement the steps of: and when the first element does not exist in the historical service sequence, the first service sequence is used as a second service sequence.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method for dynamically changing a service, the method comprising:
acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence;
when the service state in the history service sequence is a completed element, taking the completed element as a first element, and inquiring the first service sequence based on the first element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence;
And acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as a service execution sequence.
2. The method of claim 1, wherein adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, to obtain a second traffic sequence, comprises:
when a second adjacent element exists before the first element, acquiring a second adjacent element before the first element in the historical service sequence; wherein the second element belongs to an intersection of the historical service sequence and the first service sequence;
and merging the first element into the first service sequence based on the second element adjacent to the first element to obtain a second service sequence.
3. The method of claim 1, wherein adding the first element to the first traffic sequence when the first element is not present in the first traffic sequence, to obtain a second traffic sequence, comprises:
when no adjacent second element exists before the first element, the first element is added to the first element of the first service sequence, and a second service sequence is obtained; wherein the second element belongs to an intersection of the historical traffic sequence and the first traffic sequence.
4. The method of claim 1, wherein the querying the first sequence of traffic based on the first element comprises:
acquiring a node sequence of the first service sequence, traversing the first service sequence by a plurality of first elements according to the node sequence, and determining the relation between the first elements and the first service sequence;
wherein the relationship between the first element and the first service sequence includes: the first element is not present in the first service sequence, and the first element is present in the first service sequence.
5. The method of claim 1, wherein when there is a first element in the historical traffic sequence, the method further comprises:
acquiring a plurality of third elements in the historical service sequence; wherein, the third element is an element with incomplete service state;
querying the first service sequence based on a plurality of third elements;
and deleting the third element when the third element does not exist in the first service sequence.
6. The method according to claim 1, wherein the method further comprises:
And when the first element does not exist in the historical service sequence, the first service sequence is used as a second service sequence.
7. A traffic dynamic change device, the device comprising:
the data acquisition module is used for acquiring a first service sequence, a historical service sequence and service states of elements in the historical service sequence;
the second service sequence determining module is used for inquiring the first service sequence based on a first element which is used for taking the completed element as the first element when the service state in the historical service sequence is the completed element; when the first element does not exist in the first service sequence, adding the first element into the first service sequence to obtain a second service sequence;
and the service execution sequence determining module is used for acquiring the arrangement sequence of the elements with unfinished service states in the second service sequence as the service execution sequence.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310537462.6A CN116506506A (en) | 2023-05-12 | 2023-05-12 | Service dynamic change method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310537462.6A CN116506506A (en) | 2023-05-12 | 2023-05-12 | Service dynamic change method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116506506A true CN116506506A (en) | 2023-07-28 |
Family
ID=87330185
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310537462.6A Pending CN116506506A (en) | 2023-05-12 | 2023-05-12 | Service dynamic change method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116506506A (en) |
-
2023
- 2023-05-12 CN CN202310537462.6A patent/CN116506506A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114756627B (en) | Alliance-chain-based digital asset processing method, system and storage medium | |
CN116708245A (en) | Interface control method, device and computer equipment | |
CN116506506A (en) | Service dynamic change method, device, computer equipment and storage medium | |
CN115809311A (en) | Data processing method and device of knowledge graph and computer equipment | |
CN118301161A (en) | Data service processing method, device, computer equipment and storage medium | |
CN113918996B (en) | Distributed data processing method, device, computer equipment and storage medium | |
CN118364033B (en) | Data processing method and device among database clusters and related equipment | |
CN117076476A (en) | Object information processing method, device, computer equipment and storage medium | |
CN117278401A (en) | Configuration updating method and device | |
CN117194524A (en) | Offline index data processing method, device, equipment and storage medium | |
CN118152504A (en) | Unstructured data indexing method, device, apparatus, medium and program product | |
CN117354154A (en) | Network element determination method, device, computer equipment and storage medium | |
CN116910115A (en) | Group query method, device, computer equipment and storage medium | |
CN116366724A (en) | Business process processing method, device, computer equipment and storage medium | |
CN118672749A (en) | Cloud task scheduling method, device, equipment and storage medium | |
CN116541137A (en) | Transaction processing method, apparatus, computer device, storage medium, and program product | |
CN117493377A (en) | Financial index report configuration method, device, equipment and storage medium | |
CN117407156A (en) | Target data extraction method, device, computer equipment and storage medium | |
CN118820323A (en) | Track data processing method, apparatus, computer device, readable storage medium, and program product | |
CN117130606A (en) | Front-end page configuration method, front-end page configuration device, computer equipment and storage medium | |
CN116884133A (en) | Intelligent appointment number calling method, device, computer equipment and storage medium | |
CN116996580A (en) | Business service method, device, computer equipment and storage medium | |
CN117234562A (en) | Configuration parameter updating method and device and computer equipment | |
CN117931747A (en) | Metadata management method, device, system and equipment for data marts | |
CN115422199A (en) | Processing method and device of multidimensional statistical data and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |